|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.admin.ns.IntegerStrategy
Abstract class that may be extended for syntax strategies that use integer 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.
| Field Summary | |
protected static int |
WITHIN_BOUNDS
Internal Error |
| Constructor Summary | |
IntegerStrategy()
|
|
| Method Summary | |
boolean |
canCreateValue(java.lang.Object obj)
Tests to see if a LongValue can be created. |
long |
compare(ValueComponent component1,
ValueComponent component2)
Compares two value objects. |
ValueComponent |
createValueComponent()
Creates a new LongValue using zero as the default initial data. |
ValueComponent |
createValueComponent(java.lang.Object obj)
Creates a new LongValue using specified initial data. |
boolean |
equals(ValueComponent component1,
ValueComponent component2)
Tests to see if two LongValue objects are equal. |
boolean |
isWithinBounds(ValueComponent comp,
long lowerBound,
long upperBound)
Algorithm to test if a LongValue is within bounds. |
java.lang.String |
toString(ValueComponent obj)
Converts a LongValue object 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 |
| Field Detail |
protected static final int WITHIN_BOUNDS
| Constructor Detail |
public IntegerStrategy()
| Method Detail |
public boolean canCreateValue(java.lang.Object obj)
canCreateValue in interface ValueStrategyobj - An Object to create the value from.
public long compare(ValueComponent component1,
ValueComponent component2)
compare in interface Strategycomponent1 - First value used in comparison, which must be a LongValue.component2 - Second value used in comparison, which must be a LongValue.
ValueComponent.compareTo(ValueComponent)public ValueComponent createValueComponent()
createValueComponent in interface Strategypublic ValueComponent createValueComponent(java.lang.Object obj)
throws ComponentCreationException
createValueComponent in interface Strategyobj - Must be either a Number or String instance.
ComponentCreationException - if 'obj' is not a Number nor a String that
can be parsed to a long.public boolean equals(ValueComponent component1,
ValueComponent component2)
equals in interface Strategycomponent1 - First Value used in the test, which must be LongValue.component2 - Second Value used in test.
ValueComponent.equals(Object)public boolean isWithinBounds(ValueComponent comp,
long lowerBound,
long upperBound)
isWithinBounds in interface Strategycomp - The ValueComponent to check.lowerBound - The lower limit to check.upperBound - The upper limit to check.
public java.lang.String toString(ValueComponent obj)
toString in interface Strategyobj - Component to convert. Should be a LongValue instance.
ValueComponent.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||