public class IntValue extends Object implements Comparable<IntValue>, Serializable
int primitive for value classes
that want to implement standard operations on that value without the pain of
aggregating an Integer object.| Modifier and Type | Field and Description |
|---|---|
protected int |
value
the
int value |
| Constructor and Description |
|---|
IntValue(int value)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IntValue that) |
boolean |
equals(Object that)
Compares this
Object to a given Object. |
boolean |
greaterThan(int value)
Compares this
IntValue with a primitive int
value. |
boolean |
greaterThan(IntValue that)
Compares this
IntValue with another IntValue. |
int |
hashCode()
Returns the hash code for this
Object. |
boolean |
lessThan(int that)
Compares this
IntValue with a primitive int
value. |
boolean |
lessThan(IntValue that)
Compares this
IntValue with another IntValue. |
String |
toString()
Converts this
LongValue to a String. |
public IntValue(int value)
value - the int valuepublic final int compareTo(IntValue that)
compareTo in interface Comparable<IntValue>that - The object to compare withpublic final boolean equals(Object that)
Object to a given Object.public final boolean greaterThan(int value)
IntValue with a primitive int
value.value - the int value to compare withtrue if this IntValue is greater than
the given int valuepublic final boolean greaterThan(IntValue that)
IntValue with another IntValue.that - the IntValue to compare withtrue if this IntValue is greater than
the given IntValuepublic final int hashCode()
Object.public final boolean lessThan(int that)
IntValue with a primitive int
value.that - the int value to compare withtrue if this IntValue is less than the
given int valuepublic final boolean lessThan(IntValue that)
IntValue with another IntValue.that - the IntValue to compare withtrue if this IntValue is less than the
given IntValueCopyright © 2014 Molindo GmbH. All Rights Reserved.