com.novell.admin.ns
Class StringValue

java.lang.Object
  extended bycom.novell.admin.ns.ValueComponent
      extended bycom.novell.admin.ns.Value
          extended bycom.novell.admin.ns.StringValue
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class StringValue
extends Value

Storage class for all syntaxes that use string types.

This class is immutable.

See Also:
BooleanValue, HexValue, LongValue, StreamValue, Serialized Form

Constructor Summary
StringValue(Syntax syntax, java.lang.String str)
          Constructor that uses a String object.
 
Method Summary
 java.lang.String getValue()
          Returns the value as a String.
 boolean isLegalString(java.lang.String str)
          Determines if a String contains only characters supported by the associated syntax.
 
Methods inherited from class com.novell.admin.ns.Value
clone
 
Methods inherited from class com.novell.admin.ns.ValueComponent
compareTo, equals, getSyntax, isWithinBounds, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringValue

public StringValue(Syntax syntax,
                   java.lang.String str)
Constructor that uses a String object.

This constructor should be called only by a syntax strategy for data types that store data as strings.

Parameters:
syntax - Associated syntax for this String value.

The strategy associated with the syntax must extend StringStrategy, or an internal error will be thrown.

str - The String object.
See Also:
StringStrategy
Method Detail

getValue

public java.lang.String getValue()
Returns the value as a String.

Returns:
The value as String object.

isLegalString

public boolean isLegalString(java.lang.String str)
Determines if a String contains only characters supported by the associated syntax.

Parameters:
str - The String being checked.
Returns:
True if the String is valid for this syntax, otherwise false.


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.