com.novell.admin.ns
Class StreamStrategy

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

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

Base class that implements the strategies for most stream syntaxes.

This class is not intended to be used directly by any applications. Please refer to the StreamValue class.


Constructor Summary
StreamStrategy()
           
 
Method Summary
 boolean canCreateValue(java.lang.Object obj)
          Tests to see if a StreamValue can be created from the specified object.
 long compare(ValueComponent obj1, ValueComponent obj2)
          Tests to see if two StreamValue objects compare.
 ValueComponent createValueComponent()
          Creates a new ValueComponent using default values.
 ValueComponent createValueComponent(java.lang.Object obj)
          Creates a new ValueComponent using specified values.
 boolean equals(ValueComponent obj1, ValueComponent obj2)
          Tests to see if two StreamValue objects have the same syntax.
abstract  Syntax getSyntax()
          Returns the syntax associated with this strategy.
 boolean isWithinBounds(ValueComponent comp, long lowerBound, long upperBound)
          Checks to see if a component is within certain bounds.
 java.lang.String toString(ValueComponent obj)
          Converts the ValueComponent to a 256 character string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamStrategy

public StreamStrategy()
Method Detail

canCreateValue

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

createValueComponent

public ValueComponent createValueComponent()
Creates a new ValueComponent using default values.
Returns:
The new StreamValue initialized to null.

createValueComponent

public ValueComponent createValueComponent(java.lang.Object obj)
                                    throws ComponentCreationException
Creates a new ValueComponent using specified values.
Parameters:
obj - The object used as the initial value.
Returns:
The new StreamValue 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 StreamValue objects have the same syntax.
Parameters:
obj1 - Must be a StreamValue.
obj2 - Any other Value type.
Returns:
True if 'obj1' and 'obj2' have same syntax and are of type StreamValue.

compare

public long compare(ValueComponent obj1,
                    ValueComponent obj2)
Tests to see if two StreamValue objects compare.
Parameters:
obj1 - Must be a StreamValue.
obj2 - Any other Value type.
Returns:
The difference between 'obj1' and 'obj2' syntax name.

toString

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

getSyntax

public abstract Syntax getSyntax()
Returns the syntax associated with this strategy.
Specified by:
getSyntax in interface ValueStrategy

isWithinBounds

public boolean isWithinBounds(ValueComponent comp,
                              long lowerBound,
                              long upperBound)
Checks to see if a component is within certain bounds.
Returns:
Always false.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated December 17 2003 1746.