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, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public MyInteger(int _i)
_i
- the initial integer to set this topublic String toString()
toString
in class Object
Object.toString()
public boolean equals(Object obj)
equals
in interface Comparator<MyInteger>
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.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.