com.novell.ecb.value
Class BasicSequenceValue

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

public final class BasicSequenceValue
extends java.lang.Object
implements SequenceValue

The BasicSequenceValue is an implementation of SequenceValue. This object is used to store homogeneous multivalued Value.


Constructor Summary
BasicSequenceValue(java.lang.String name)
          Constructs a BasicSequenceValue object based on the specified parameter.
BasicSequenceValue(java.lang.String name, Value[] values)
          Constructs a BasicSequenceValue object based on the specified parameters.
BasicSequenceValue(Value[] values)
          Constructs a BasicSequenceValue object based on the specified parameter.
 
Method Summary
 int compareTo(java.lang.Object object)
          Compares this Value with the parameter object.
 int count()
          Returns the number of elements in this sequence.
 boolean equals(java.lang.Object object)
          Compares two objects for equality.
 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.
 Value getValue(int index)
          Returns the object at the given index.
 java.util.Iterator getValues()
          Returns an enumeration of this sequence's values.
 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

BasicSequenceValue

public BasicSequenceValue(java.lang.String name)
Constructs a BasicSequenceValue object based on the specified parameter.

Parameters:
name - The name of the sequence value to be stored.

BasicSequenceValue

public BasicSequenceValue(java.lang.String name,
                          Value[] values)
Constructs a BasicSequenceValue object based on the specified parameters.

Parameters:
name - The name of the sequence value to be stored.
values - Array of values which this sequence will hold.

BasicSequenceValue

public BasicSequenceValue(Value[] values)
Constructs a BasicSequenceValue object based on the specified parameter.

Parameters:
values - Array of values which this sequence will hold.
Method Detail

compareTo

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

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.
Throws:
java.lang.IllegalArgumentException - Thrown if the argument Object is not an instance of SequenceValue.

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 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.

count

public int count()
Returns the number of elements in this sequence.

Specified by:
count in interface SequenceValue
Returns:
int The number of elements in this sequence.

getValues

public java.util.Iterator getValues()
Returns an enumeration of this sequence's values.

Specified by:
getValues in interface SequenceValue
Returns:
Iterator An iterator on the values of the sequence.

getValue

public Value getValue(int index)
Returns the object at the given index.

Specified by:
getValue in interface SequenceValue
Parameters:
index - Integer position from which value is to be retrieved.
Returns:
Value The value stored at the given index.

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 this object.


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