wicket.util.value
Class LongValue

java.lang.Object
  extended bywicket.util.value.LongValue
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
AbstractTimeValue, Bytes

public class LongValue
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

A base class for value classes based on a Java long primitive which want to implement standard operations on that value without the pain of aggregating a Long object.

Author:
Jonathan Locke
See Also:
Serialized Form

Field Summary
protected  long value
          The long value
 
Constructor Summary
LongValue(long value)
          Constructor
 
Method Summary
 int compareTo(java.lang.Object object)
           
 boolean equals(java.lang.Object that)
           
 boolean greaterThan(long value)
           
 boolean greaterThan(LongValue that)
           
 int hashCode()
           
 boolean lessThan(long that)
           
 boolean lessThan(LongValue that)
           
 java.lang.String toString()
          Converts this value to a string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected final long value
The long value

Constructor Detail

LongValue

public LongValue(long value)
Constructor

Parameters:
value - The long value
Method Detail

compareTo

public final int compareTo(java.lang.Object object)
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - The object to compare with
Returns:
0 if equal, -1 if less than or 1 if greater than

equals

public final boolean equals(java.lang.Object that)
Parameters:
that - The value to compare against
Returns:
True if this value is equal to that value

greaterThan

public final boolean greaterThan(long value)
Parameters:
value - The value to compare against
Returns:
True if this value is greater than the given value

greaterThan

public final boolean greaterThan(LongValue that)
Parameters:
that - The value to compare against
Returns:
True if this value is greater than that value

hashCode

public final int hashCode()
Returns:
Hashcode for this object

lessThan

public final boolean lessThan(long that)
Parameters:
that - The value to compare against
Returns:
True if this value is less than that value

lessThan

public final boolean lessThan(LongValue that)
Parameters:
that - The value to compare against
Returns:
True if this value is less than that value

toString

public java.lang.String toString()
Converts this value to a string

Returns:
The string for this value


Copyright © 2004-2006 Wicket developers. All Rights Reserved.