Package org.globus.rsl
Class Value
- java.lang.Object
-
- org.globus.rsl.Value
-
- Direct Known Subclasses:
VarRef
public class Value extends java.lang.ObjectThis class represents a simple value (a string) that can be concatinated with another value.
-
-
Field Summary
Fields Modifier and Type Field Description protected ValueconcatValueprotected java.lang.Stringvalue
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconcat(Value value)Appends the specified value to the end of the chain of concatinated values.booleanequals(java.lang.Object obj)java.lang.Stringevaluate(java.util.Map symbolTable)Evaluates the value with the specified symbol table.java.lang.StringgetCompleteValue()Returns a complete string representation of this value.ValuegetConcat()Returns the value that is concatinated with this value.java.lang.StringgetValue()Returns the actual string value.inthashCode()voidsetValue(java.lang.String value)Sets the actual value.java.lang.StringtoRSL(boolean explicitConcat)Returns a RSL representation of this value.voidtoRSL(java.lang.StringBuffer buf, boolean explicitConcat)Produces a RSL representation of this value.java.lang.StringtoString()
-
-
-
Field Detail
-
value
protected java.lang.String value
-
concatValue
protected Value concatValue
-
-
Constructor Detail
-
Value
public Value(java.lang.String value)
-
Value
public Value(java.lang.String value, Value concatValue)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
setValue
public void setValue(java.lang.String value)
Sets the actual value.- Parameters:
value- the new value.
-
getValue
public java.lang.String getValue()
Returns the actual string value.- Returns:
- the current value.
-
getConcat
public Value getConcat()
Returns the value that is concatinated with this value.- Returns:
- the value that is concatinated with this value. Null, otherwise.
-
concat
public void concat(Value value)
Appends the specified value to the end of the chain of concatinated values. That is, if this value has no concatinated value then set the specified value as the concatinated value. If this value already has a concatinated value then append the specified value to that concatinated value.- Parameters:
value- the value to concatinate.
-
evaluate
public java.lang.String evaluate(java.util.Map symbolTable) throws RslEvaluationExceptionEvaluates the value with the specified symbol table. In this case the function just returns the string representation of the actual value. No symbol table lookups are performed.- Parameters:
symbolTable- the symbol table to evaluate the value against.- Returns:
- an evaluated string.
- Throws:
RslEvaluationException- If an error occured during rsl evaluation.
-
toRSL
public java.lang.String toRSL(boolean explicitConcat)
Returns a RSL representation of this value.- Parameters:
explicitConcat- if true explicit concatination will be used in RSL strings.- Returns:
- RSL representation of this value.
-
toRSL
public void toRSL(java.lang.StringBuffer buf, boolean explicitConcat)Produces a RSL representation of this value.- Parameters:
buf- buffer to add the RSL representation to.explicitConcat- if true explicit concatination will be used in RSL strings.
-
getCompleteValue
public java.lang.String getCompleteValue()
Returns a complete string representation of this value.- Returns:
- a complete string representation of this value.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-