|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.admin.ns.StringStrategy
Abstract class which may be extended for syntax strategies that use String as the value type.
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 Summary | |
StringStrategy()
|
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.novell.admin.ns.ValueStrategy |
getSyntax |
Constructor Detail |
public StringStrategy()
Method Detail |
public boolean canCreateValue(java.lang.Object obj)
canCreateValue
in interface ValueStrategy
obj
- The object to test against.
public long compare(ValueComponent obj1, ValueComponent obj2)
compare
in interface Strategy
obj1
- First value component which must be a StringValue.obj2
- Second value component which must be a StringValue.
ValueComponent.compareTo(ValueComponent)
public ValueComponent createValueComponent()
createValueComponent
in interface Strategy
public ValueComponent createValueComponent(java.lang.Object obj) throws ComponentCreationException
createValueComponent
in interface Strategy
obj
- Object used to create the Value.
ComponentCreationException
- if Object can't be used to create the Value.public boolean equals(ValueComponent obj1, ValueComponent obj2)
equals
in interface Strategy
obj1
- 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 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 Strategy
comp
- 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.
public java.lang.String toString(ValueComponent obj)
toString
in interface Strategy
obj
- ValueComponent to convert.
ValueComponent.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |