public abstract class StringStrategy extends java.lang.Object implements ValueStrategy
Methods in this class and any subclasses are not intended to be used directly by an application. These methods are intended to be use by ValueComponent and syntax classes.
| Constructor and Description |
|---|
StringStrategy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateValue(java.lang.Object obj)
Checks to see if a Value could be created from some object.
|
long |
compare(ValueComponent obj1,
ValueComponent obj2)
Compares one StringValue to another for sorting.
|
ValueComponent |
createValueComponent()
Creates a StringValue using an empty string as the default.
|
ValueComponent |
createValueComponent(java.lang.Object obj)
Creates a StringValue from an Object.
|
boolean |
equals(ValueComponent obj1,
ValueComponent obj2)
Tests to see one ValueComponent is equal to another.
|
protected boolean |
equalsIgnoreCase(ValueComponent obj1,
ValueComponent obj2)
Performs an ignore-case equals test for two StringValue components.
|
boolean |
isLegalString(java.lang.String s)
Checks to see if a string contains only legal characters.
|
boolean |
isWithinBounds(ValueComponent comp,
long lowerBound,
long upperBound)
Tests to see a ValueComponent is within bounds.
|
protected boolean |
stringIsValid(java.lang.String validChars,
java.lang.String s)
Checks to see if a String contains only valid characters.
|
java.lang.String |
toString(ValueComponent obj)
Converts a ValueComponent to a string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSyntaxpublic boolean equals(ValueComponent obj1, ValueComponent obj2)
equals in interface Strategyobj1 - First ValueComponent which must be a StringValue.obj2 - Second ValueComponent which should be a StringValue.ValueComponent.equals(Object)protected final boolean equalsIgnoreCase(ValueComponent obj1, ValueComponent obj2)
obj1 - First StringValue.obj2 - Second StringValue.public long compare(ValueComponent obj1, ValueComponent obj2)
compare in interface Strategyobj1 - First value component which must be a StringValue.obj2 - Second value component which must be a StringValue.ValueComponent.compareTo(ValueComponent)public java.lang.String toString(ValueComponent obj)
toString in interface Strategyobj - ValueComponent to convert.ValueComponent.toString()public boolean canCreateValue(java.lang.Object obj)
canCreateValue in interface ValueStrategyobj - The object to test against.public ValueComponent createValueComponent(java.lang.Object obj) throws ComponentCreationException
createValueComponent in interface Strategyobj - Object used to create the Value.ComponentCreationException - if Object can't be used to create the Value.public ValueComponent createValueComponent()
createValueComponent in interface Strategypublic boolean isLegalString(java.lang.String s)
Classes which extend this class should override this method and enforce any restrictions on allowed characters.
s - The String to check.public boolean isWithinBounds(ValueComponent comp, long lowerBound, long upperBound)
isWithinBounds in interface Strategycomp - The component to test.lowerBound - The lower bound for the test.upperBound - The upper bound for the test.protected boolean stringIsValid(java.lang.String validChars,
java.lang.String s)
validChars - A String containing all valid characters.s - The String to check.
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 ${TODAY} ${TSTAMP}.