wt.rule.init
Class AbstractAlgoValue

java.lang.Object
  extended bywt.rule.init.AbstractAlgoValue
All Implemented Interfaces:
AlgoValue, InitRuleElem, Serializable
Direct Known Subclasses:
AttrValue, Value

public abstract class AbstractAlgoValue
extends Object
implements AlgoValue, Serializable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
 String algorithm
          The name of the algorithm class than can be usd to compute this attribute's value.
 List args
          The list of arguments that are passed to the algorithm in order to compute this attribute value.
private static String CLASSNAME
           
private static String RESOURCE
           
 
Fields inherited from interface wt.rule.init.AlgoValue
ALGORITHM, ARGS
 
Constructor Summary
AbstractAlgoValue(String algorithm)
          Create a new algorithm value using the specified parameters.
 
Method Summary
 void addArg(Attr arg)
          Add the specified value to the list of arguments to be passed to this specification's algorithm.
 void addArg(String arg)
          Add the specified value to the list of arguments to be passed to this specification's algorithm.
 void addArg(Value arg)
          Add the specified value to the list of arguments to be passed to this specification's algorithm.
protected  void copyArgsTo(AlgoValue copy)
          Copy the args of this AlgoValue to another AlgoValue specification.
 boolean equals(Object obj)
          

Supported API: false
protected static boolean equals(Object o1, Object o2)
          Return true if both objects are null or o1.equals(o2) is true.
 String getAlgorithm()
          Gets the value of the attribute: algorithm; The name of the algorithm class than can be usd to compute this attribute's value.
 Object getArg(int index)
          Returns the arg at the specified position in the argument list.
 List getArgs()
          Gets the value of the attribute: args; The list of arguments that are passed to the algorithm in order to compute this attribute value.
 Object removeArg(int index)
          Removes the argument at the specified position in the argument list.
 Object setArg(int index, Object arg)
          Replaces the argument at the specified position in the argument list with the specified argument.
 String toString()
           
protected  void writeArgs(Writer writer, String indent)
          Write the XML for this value's args to the specified Writer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.rule.init.InitRuleElem
getObjType, writeXML
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

algorithm

public final String algorithm
The name of the algorithm class than can be usd to compute this attribute's value.

Supported API: false


args

public final List args
The list of arguments that are passed to the algorithm in order to compute this attribute value.

Supported API: false

Constructor Detail

AbstractAlgoValue

public AbstractAlgoValue(String algorithm)
Create a new algorithm value using the specified parameters.

Supported API: false

Parameters:
algorithm - the algorithm that is used to compute the attribute's value
Method Detail

addArg

public void addArg(String arg)
Add the specified value to the list of arguments to be passed to this specification's algorithm.

Supported API: false

Specified by:
addArg in interface AlgoValue
Parameters:
arg - an argument for this specification's algorithm

addArg

public void addArg(Attr arg)
Add the specified value to the list of arguments to be passed to this specification's algorithm.

Supported API: false

Specified by:
addArg in interface AlgoValue
Parameters:
arg -

addArg

public void addArg(Value arg)
Add the specified value to the list of arguments to be passed to this specification's algorithm.

Supported API: false

Specified by:
addArg in interface AlgoValue
Parameters:
arg -

getArg

public Object getArg(int index)
              throws IndexOutOfBoundsException
Returns the arg at the specified position in the argument list.

Supported API: false

Specified by:
getArg in interface AlgoValue
Parameters:
index - index of argument to return
Returns:
Object
Throws:
IndexOutOfBoundsException

setArg

public Object setArg(int index,
                     Object arg)
              throws IndexOutOfBoundsException,
                     IllegalArgumentException
Replaces the argument at the specified position in the argument list with the specified argument. Returns the argument previously at the specified position.

Supported API: false

Specified by:
setArg in interface AlgoValue
Parameters:
index - index of argument to replace
arg - argument to be stored at the specified position
Returns:
Object
Throws:
IndexOutOfBoundsException
IllegalArgumentException

removeArg

public Object removeArg(int index)
                 throws IndexOutOfBoundsException
Removes the argument at the specified position in the argument list. Shifts any subsequent arguments to the left (subtracts one from their indices). Returns the argument that was removed from the list.

Supported API: false

Specified by:
removeArg in interface AlgoValue
Parameters:
index - the index of the argument to removed
Returns:
Object
Throws:
IndexOutOfBoundsException

copyArgsTo

protected void copyArgsTo(AlgoValue copy)
Copy the args of this AlgoValue to another AlgoValue specification.

Supported API: false

Parameters:
copy - the parent to copy to

equals

public boolean equals(Object obj)


Supported API: false

Parameters:
obj -
Returns:
boolean

getAlgorithm

public String getAlgorithm()
Gets the value of the attribute: algorithm; The name of the algorithm class than can be usd to compute this attribute's value.

Supported API: false

Specified by:
getAlgorithm in interface AlgoValue
Returns:
String

getArgs

public List getArgs()
Gets the value of the attribute: args; The list of arguments that are passed to the algorithm in order to compute this attribute value.

Supported API: false

Specified by:
getArgs in interface AlgoValue
Returns:
List

toString

public String toString()

equals

protected static boolean equals(Object o1,
                                Object o2)
Return true if both objects are null or o1.equals(o2) is true.


writeArgs

protected void writeArgs(Writer writer,
                         String indent)
                  throws IOException
Write the XML for this value's args to the specified Writer.

Parameters:
writer -
Throws:
IOException