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