|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.admin.ns.TimeStrategy
Final class that implements the strategy for most TIME syntaxes.
This class is not intended to by used directly by applications.
| Field Summary | |
protected static int |
WITHIN_BOUNDS
Internal Error |
| Constructor Summary | |
TimeStrategy()
|
|
| Method Summary | |
boolean |
canCreateValue(java.lang.Object obj)
Test to see if a Time can be created from the specified object. |
long |
compare(ValueComponent component1,
ValueComponent component2)
Compares two value objects. |
ValueComponent |
createValueComponent()
Creates a new ValueComponent using default values. |
ValueComponent |
createValueComponent(java.lang.Object obj)
Creates a new ValueComponent. |
boolean |
equals(ValueComponent component1,
ValueComponent component2)
Tests to see if two DateValue objects are equal. |
abstract Syntax |
getSyntax()
Returns the syntax associated with this strategy. |
boolean |
isWithinBounds(ValueComponent comp,
long lowerBound,
long upperBound)
Checks if a DateValue is within bounds. |
java.lang.String |
toString(ValueComponent obj)
Converts the value to a string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int WITHIN_BOUNDS
| Constructor Detail |
public TimeStrategy()
| Method Detail |
public boolean canCreateValue(java.lang.Object obj)
canCreateValue in interface ValueStrategyobj - Must be an instance of a Number, Date, or String.
public long compare(ValueComponent component1,
ValueComponent component2)
compare in interface Strategycomponent1 - First value used in comparison which must be a DateValue.component2 - Second value used in comparison which must be a DateValue.
ValueComponent.compareTo(ValueComponent)public ValueComponent createValueComponent()
createValueComponent in interface Strategypublic ValueComponent createValueComponent(java.lang.Object obj)
throws ComponentCreationException
createValueComponent in interface Strategyobj - Must be a Date, Number (meaning milliseconds), or String.
ComponentCreationException - A bad date string passed in.public boolean equals(ValueComponent component1,
ValueComponent component2)
equals in interface Strategycomponent1 - First Value used in test which must be DateValue.component2 - Second Value used in test.
ValueComponent.equals(Object)public abstract Syntax getSyntax()
getSyntax in interface ValueStrategypublic boolean isWithinBounds(ValueComponent comp,
long lowerBound,
long upperBound)
isWithinBounds in interface Strategycomp - The ValueComponent to check.lowerBound - The lower limit to check in milliseconds.upperBound - The upper limit to check in milliseconds.
public java.lang.String toString(ValueComponent obj)
toString in interface Strategyobj - A DateValue object.
ValueComponent.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||