com.novell.ecb.value
Class BasicStringValue

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

public class BasicStringValue
extends java.lang.Object
implements StringValue

The BasicStringValue is an implementation of StringValue. This object is used to store string Value.


Constructor Summary
BasicStringValue(java.lang.String name, java.lang.String value)
          Constructs a BasicStringValue object based on the specified parameters.
 
Method Summary
 int compareTo(java.lang.Object object)
          Compares this Value with the parameter object.
 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.
 java.lang.String stringValue()
          Returns the value of this StringValue as a String.
 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

BasicStringValue

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

Parameters:
name - The name of the string value to be stored.
value - String value which this object 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; an 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 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 Provider specific object for this value.

stringValue

public java.lang.String stringValue()
Returns the value of this StringValue as a String.

Specified by:
stringValue in interface StringValue
Returns:
String The String value represented by 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
Returns:
boolean 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.