com.novell.admin.ns
Class BooleanStrategy

java.lang.Object
  |
  +--com.novell.admin.ns.BooleanStrategy
All Implemented Interfaces:
Strategy, ValueStrategy

public abstract class BooleanStrategy
extends java.lang.Object
implements ValueStrategy

Final class that implements the strategy for the NDS boolean syntax.

This class is not public and no methods should be available to applications.


Constructor Summary
BooleanStrategy()
           
 
Method Summary
 boolean canCreateValue(java.lang.Object obj)
          Test to see if a BooleanValue can be created from the specified object.
 long compare(ValueComponent obj1, ValueComponent obj2)
          Tests to see how two BooleanValues compare.
 ValueComponent createValueComponent()
          Factory a new ValueComponent using default values.
 ValueComponent createValueComponent(java.lang.Object obj)
          Factory a new ValueComponent using specified values.
 boolean equals(ValueComponent obj1, ValueComponent obj2)
          Tests to see if two BooleanValues are identical.
 boolean isWithinBounds(ValueComponent comp, long lowerBound, long upperBound)
          Check to see if a BooleanComponent is within certain bounds.
 java.lang.String toString(ValueComponent obj)
          Converts the ValueComponent to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanStrategy

public BooleanStrategy()
Method Detail

canCreateValue

public boolean canCreateValue(java.lang.Object obj)
Test to see if a BooleanValue can be created from the specified object.
Specified by:
canCreateValue in interface ValueStrategy
Parameters:
obj - Any object.
Returns:
true if create will succeed, false otherwise.

createValueComponent

public ValueComponent createValueComponent()
Factory a new ValueComponent using default values.
Returns:
The new BooleanValue initialized to true.

createValueComponent

public ValueComponent createValueComponent(java.lang.Object obj)
                                    throws ComponentCreationException
Factory a new ValueComponent using specified values.
Parameters:
obj - The object used as the initial value.
Returns:
The new BooleanValue initialized to true.
Throws:
ComponentCreationException - if 'obj' cannot be used as the initial value.

equals

public boolean equals(ValueComponent obj1,
                      ValueComponent obj2)
Tests to see if two BooleanValues are identical.
Parameters:
obj1 - Must be a BooleanValue.
obj2 - Any other Value type.
Returns:
true if 'obj1' is equal to 'obj2'.

compare

public long compare(ValueComponent obj1,
                    ValueComponent obj2)
Tests to see how two BooleanValues compare.
Parameters:
obj1 - Must be a BooleanValue.
obj2 - Must be a BooleanValue.
Returns:
0 if equal, greater than 1 for obj1>obj2 or less than 1 for obj1

toString

public java.lang.String toString(ValueComponent obj)
Converts the ValueComponent to a string.
Parameters:
obj - Must be a BooleanValue.
Returns:
String representation of the value.

isWithinBounds

public boolean isWithinBounds(ValueComponent comp,
                              long lowerBound,
                              long upperBound)
Check to see if a BooleanComponent is within certain bounds.
Parameters:
com - The ValueComponent holding the values.
lowerBound - The lower bound.
upperBound - The upper bound.
Returns:
Always false.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.