com.novell.service.nds
Class NdsLong

java.lang.Object
  |
  +--com.novell.service.nds.NdsLong

public class NdsLong
extends java.lang.Object
implements , java.io.Serializable

Provides access to values of the Long attribute. It is used for attributes whose values are signed integers. The attributes for two longs match for equality if they are the same. The comparison for ordering uses signed integer rules. Attributes using this syntax can set size limits.

Matching Rules: Equality and Ordering

See Also:
NdsSyntaxId

Method Summary
 byte byteValue()
          Returns the value of this NDS object as a byte.
 int compareTo(java.lang.Object anObject)
          Compares two objects for ordering, or compares two strings lexicographically.
 double doubleValue()
          Returns the value of this NDS object as a double.
 boolean equals(java.lang.Object anObject)
          Compares two Objects for equality.
 float floatValue()
          Returns the value of this NDS object as a float.
 int intValue()
          Returns the value of this NDS object as an int.
 long longValue()
          Returns the value of this NDS object as a long.
 short shortValue()
          Returns the value of this NDS object as a short.
 java.lang.String toString()
          Generates a string representation of the object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

compareTo

public int compareTo(java.lang.Object anObject)
              throws java.lang.Exception
Compares two objects for ordering, or compares two strings lexicographically. For the Long syntax, the compareTo method compares this NDS Object with a reference NDS Object contained in the anObject parameter. The comparison is done according to the Ordering matching rule for this syntax.
Parameters:
anObject - The reference NDS Object with which to compare.
Returns:
An int set to 0 if the reference Object is equal to this Object; an int <0 if the reference Object is less than this Object; an int >0 if the reference Object is greater than this Object.
Throws:
java.lang.IllegalArgumentException - The passed-in object is of a different type than this NDS Object.

equals

public boolean equals(java.lang.Object anObject)
Compares two Objects for equality. The equals method compares this object value with the value of the reference object in the anObject parameter.

The equals method implements the most discriminating possible equivalence relation on objects; that is, for any reference values X and Y, this method returns TRUE if and only if X and Y refer to the same object (X==Y has the value TRUE).

Parameters:
anObject - The reference object with which to compare.
Returns:
A boolean set to TRUE if and only if the argument is not NULL and is an NDS integer object that contains the same value as this object, otherwise set to FALSE.
Overrides:
equals in class java.lang.Object

intValue

public int intValue()
Returns the value of this NDS object as an int.
Specified by:
intValue in interface
Returns:
The int value of this NDS object.

longValue

public long longValue()
Returns the value of this NDS object as a long.
Specified by:
longValue in interface
Returns:
The long value of this NDS object.

floatValue

public float floatValue()
Returns the value of this NDS object as a float.
Specified by:
floatValue in interface
Returns:
The float value of this NDS object.

doubleValue

public double doubleValue()
Returns the value of this NDS object as a double.
Specified by:
doubleValue in interface
Returns:
The double value of this NDS object.

byteValue

public byte byteValue()
Returns the value of this NDS object as a byte.
Specified by:
byteValue in interface
Returns:
The byte value of this NDS object.

shortValue

public short shortValue()
Returns the value of this NDS object as a short.
Specified by:
shortValue in interface
Returns:
The short value of this NDS object.

toString

public java.lang.String toString()
Generates a string representation of the object. It returns a string that textually represents the object. The result should be a concise but informative representation that is easy to read.
Returns:
The String representation of the object.
Overrides:
toString in class java.lang.Object