public class MyInteger extends Object implements Comparator<MyInteger>
| Modifier and Type | Field and Description |
|---|---|
int |
i
the int value of this
|
| Constructor and Description |
|---|
MyInteger(int _i) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(MyInteger o1,
MyInteger o2) |
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic MyInteger(int _i)
_i - the initial integer to set this topublic String toString()
toString in class ObjectObject.toString()public boolean equals(Object obj)
equals in interface Comparator<MyInteger>equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public int compare(MyInteger o1, MyInteger o2)
compare in interface Comparator<MyInteger>o1 - the first MyIntegero2 - the secondMyIntegerComparator.compare(java.lang.Object, java.lang.Object)Copyright © 2018. All rights reserved.