com.novell.ecb.value
Class BasicIntegerValue

java.lang.Object
  |
  +--com.novell.ecb.value.BasicIntegerValue
All Implemented Interfaces:
NumberValue, Value

public class BasicIntegerValue
extends java.lang.Object
implements NumberValue

Provides access to values of the Integer attribute. It is used for attributes whose values are signed integers. Attributes using this syntax can set size limits.


Constructor Summary
BasicIntegerValue(java.lang.String name, int value)
          Constructs a BasicIntegerValue object based on the specified parameters.
 
Method Summary
 byte byteValue()
          Returns the value of this object as a byte.
 int compareTo(java.lang.Object object)
          Compares this Value with the parameter anObject.
 double doubleValue()
          Returns the value of this object as a double.
 boolean equals(java.lang.Object object)
          Compares two objects for equality.
 float floatValue()
          Returns the value of this object as a float.
 java.lang.String getName()
          Return the name of the value.
 java.lang.Object getObjectInstance()
          Returns the provider specific object for this value.
 java.lang.String getSyntaxName()
          Returns the provider specific syntax for this value.
 int intValue()
          Returns the value of this object as an int.
 long longValue()
          Returns the value of this object as a long.
 short shortValue()
          Returns the value of this object as a short.
 java.lang.String toString()
          Returns a String that represents the value of this object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicIntegerValue

public BasicIntegerValue(java.lang.String name,
                         int value)
Constructs a BasicIntegerValue object based on the specified parameters.

Parameters:
name - The name of the signed integer to be stored.
value - The value of the signed integer to be stored.
Method Detail

compareTo

public int compareTo(java.lang.Object object)
Compares this Value with the parameter anObject.

Specified by:
compareTo in interface Value
Parameters:
object - The Value to be compared.
Returns:
int Returns 0 if the argument is equal to this value; a integer less than 0 if this value is less than the argument and a number greater than 0 if this value is greater than the argument.

getName

public java.lang.String getName()
Return the name of the value.

Specified by:
getName in interface Value
Returns:
String The name of this value.

getSyntaxName

public java.lang.String getSyntaxName()
Returns the provider specific syntax for this value.

Specified by:
getSyntaxName in interface Value
Returns:
String Value representing syntax.

getObjectInstance

public java.lang.Object getObjectInstance()
Returns the provider specific object for this value.

Specified by:
getObjectInstance in interface Value
Returns:
Object The provider specific object for this value.

intValue

public int intValue()
Returns the value of this object as an int.

Specified by:
intValue in interface NumberValue
Returns:
int Integer value of this object.

longValue

public long longValue()
Returns the value of this object as a long.

Specified by:
longValue in interface NumberValue
Returns:
long Long value of this object.

floatValue

public float floatValue()
Returns the value of this object as a float.

Specified by:
floatValue in interface NumberValue
Returns:
float Float value of this object.

doubleValue

public double doubleValue()
Returns the value of this object as a double.

Specified by:
doubleValue in interface NumberValue
Returns:
double Double value of this object.

byteValue

public byte byteValue()
Returns the value of this object as a byte.

Specified by:
byteValue in interface NumberValue
Returns:
byte Byte value of this object.

shortValue

public short shortValue()
Returns the value of this object as a short.

Specified by:
shortValue in interface NumberValue
Returns:
short Short value of this object.

equals

public boolean equals(java.lang.Object object)
Compares two objects for equality. Returns a boolean that indicates whether this object is equivalent to the specified object. This method is used when an object is stored in a hashtable.

Overrides:
equals in class java.lang.Object
Parameters:
object - The Object to compare with.
Returns:
boolean Returns true if these Objects are equal; false otherwise.

toString

public java.lang.String toString()
Returns a String that represents the value of this object.

Overrides:
toString in class java.lang.Object
Returns:
String A string representation of the object.


Copyright © 2001-2003 Novell, Inc. All Rights Reserved.