Opus5
Class Lng

java.lang.Object
  |
  +--Opus5.AbstractObject
        |
        +--Opus5.Lng
All Implemented Interfaces:
Comparable

public class Lng
extends AbstractObject

Wrapper class that wraps a long and implements the Comparable interface.

Version:
$Id: Lng.java,v 3.3 1998/07/28 13:48:25 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
Comparable

Field Summary
protected  long value
          The wrapped long.
 
Fields inherited from interface Opus5.Comparable
copyright
 
Constructor Summary
Lng(long value)
          Constructs a Lng with the specified value.
 
Method Summary
protected  int compareTo(Comparable object)
          Compares this Lng with the specified comparable object.
 int hashCode()
          Returns a hashcode for this Lng.
 long longValue()
          Returns the value of this Lng.
 java.lang.String toString()
          Returns a string representation of this Lng.
 
Methods inherited from class Opus5.AbstractObject
compare, equals, isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected long value
The wrapped long.
Constructor Detail

Lng

public Lng(long value)
Constructs a Lng with the specified value.
Parameters:
value - The specified value.
Method Detail

longValue

public long longValue()
Returns the value of this Lng.
Returns:
The value of this Lng.

compareTo

protected int compareTo(Comparable object)
Compares this Lng with the specified comparable object. The specified comparable object is assumed to be a Lng instance.
Overrides:
compareTo in class AbstractObject
Parameters:
object - The object with which this object is compared.
Returns:
-1 if this object is less than the specified object; +1 if this object is greater than the specfied object; zero if the two objects are equal.

hashCode

public int hashCode()
Returns a hashcode for this Lng.
Overrides:
hashCode in class java.lang.Object
Returns:
A hashcode for this Lng.

toString

public java.lang.String toString()
Returns a string representation of this Lng.
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this Lng.