Package org.cip4.jdflib.util
Class MyInteger
java.lang.Object
org.cip4.jdflib.util.MyInteger
- All Implemented Interfaces:
Comparator<MyInteger>
very simple and fast mutable integer class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
i
public int ithe int value of this
-
-
Constructor Details
-
MyInteger
public MyInteger(int _i) - Parameters:
_i- the initial integer to set this to
-
-
Method Details
-
toString
-
equals
- Specified by:
equalsin interfaceComparator<MyInteger>- Overrides:
equalsin classObject- See Also:
-
hashCode
public int hashCode() -
compare
- Specified by:
comparein interfaceComparator<MyInteger>- Parameters:
o1- the first MyIntegero2- the secondMyInteger- Returns:
- o1-o2
- See Also:
-