org.cip4.jdflib.util
Class MyLong
java.lang.Object
org.cip4.jdflib.util.MyLong
- All Implemented Interfaces:
- Comparator<MyLong>
public class MyLong
- extends Object
- implements Comparator<MyLong>
very simple and fast mutable long integer class
- Author:
- Dr. Rainer Prosi, Heidelberger Druckmaschinen AG
|
Field Summary |
long |
i
the long value of this |
|
Constructor Summary |
MyLong(long _i)
|
i
public long i
- the long value of this
MyLong
public MyLong(long _i)
- Parameters:
_i - the initial long to set this to
toString
public String toString()
- Overrides:
toString in class Object
- Returns:
- the value of long as a string
- See Also:
Object.toString()
equals
public boolean equals(Object obj)
- Specified by:
equals in interface Comparator<MyLong>- Overrides:
equals in class Object
- See Also:
Object.equals(java.lang.Object)
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
- See Also:
Object.hashCode()
compare
public int compare(MyLong o1,
MyLong o2)
- Specified by:
compare in interface Comparator<MyLong>
- Parameters:
o1 - the first MyIntegero2 - the secondMyInteger
- Returns:
- o1-o2
- See Also:
Comparator.compare(java.lang.Object, java.lang.Object)
Copyright © 2013. All Rights Reserved.