|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.value.LongValue
public class LongValue
A base class based on the Java long
primitive for value classes that want to
implement standard operations on that value without the pain of aggregating a Long
object.
Field Summary | |
---|---|
protected long |
value
the long value |
Constructor Summary | |
---|---|
LongValue(long value)
Constructor. |
Method Summary | ||
---|---|---|
int |
compareTo(LongValue that)
Compares this Object to a given Object . |
|
boolean |
equals(java.lang.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 . |
|
boolean |
greaterThanOrEqual(long value)
Compares this LongValue with a primitive long value. |
|
boolean |
greaterThanOrEqual(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 . |
|
boolean |
lessThanOrEqual(long that)
Compares this LongValue with a primitive long value. |
|
boolean |
lessThanOrEqual(LongValue that)
Compares this LongValue with another LongValue . |
|
static
|
max(T lhs,
T rhs)
Returns the max of the two long values. |
|
static
|
maxNullSafe(T lhs,
T rhs)
Null-safe version of max(T, T) . |
|
java.lang.String |
toString()
Converts this LongValue to a String . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final long value
long
value
Constructor Detail |
---|
public LongValue(long value)
value
- the long
valueMethod Detail |
---|
public final int compareTo(LongValue that)
Object
to a given Object
.
compareTo
in interface java.lang.Comparable<LongValue>
that
- the Object
to compare with
Object
's value, or 1 if greater
than given Object
's valuepublic final boolean equals(java.lang.Object that)
equals
in class java.lang.Object
that
- the Object
to compare with
true
if this Object
's value is equal to the given
Object
's valuepublic final boolean greaterThan(long value)
LongValue
with a primitive long
value.
value
- the long
value to compare with
true
if this LongValue
is greater than the given
long
valuepublic final boolean greaterThanOrEqual(long value)
LongValue
with a primitive long
value.
value
- the long
value to compare with
true
if this LongValue
is greater than or equal to the
given long
valuepublic final boolean greaterThan(LongValue that)
LongValue
with another LongValue
.
that
- the LongValue
to compare with
true
if this LongValue
is greater than the given
LongValue
public final boolean greaterThanOrEqual(LongValue that)
LongValue
with another LongValue
.
that
- the LongValue
to compare with
true
if this LongValue
is greater than or equal to the
given LongValue
public final int hashCode()
Object
.
hashCode
in class java.lang.Object
Object
public final boolean lessThan(long that)
LongValue
with a primitive long
value.
that
- the long
value to compare with
true
if this LongValue
is less than the given
long
valuepublic final boolean lessThanOrEqual(long that)
LongValue
with a primitive long
value.
that
- the long
value to compare with
true
if this LongValue
is less than or equal to the given
long
valuepublic final boolean lessThan(LongValue that)
LongValue
with another LongValue
.
that
- the LongValue
value to compare with
true
if this LongValue
is less than the given
LongValue
public final boolean lessThanOrEqual(LongValue that)
LongValue
with another LongValue
.
that
- the LongValue
value to compare with
true
if this LongValue
is less than or equal to the given
LongValue
public java.lang.String toString()
LongValue
to a String
.
toString
in class java.lang.Object
String
representation of this LongValue
public static <T extends LongValue> T max(T lhs, T rhs)
T
- lhs
- rhs
-
java.lang.IllegalArgumentException
- if either argument is null
public static <T extends LongValue> T maxNullSafe(T lhs, T rhs)
max(T, T)
. Nulls are considered less then any concrete
value.
T
- lhs
- rhs
-
null
if they are both null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |