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