com.ibm.rational.rpe.common.data
Class Value

java.lang.Object
  extended by com.ibm.rational.rpe.common.data.Value
All Implemented Interfaces:
com.ibm.rational.rpe.common.template.visitor.Visitable

public class Value
extends java.lang.Object
implements com.ibm.rational.rpe.common.template.visitor.Visitable

Author:
Gebs Assigned to: Calin Modified by: Milan Modified by: Spurlos Refactored the attributes Refactored for 1.2.0.1 to avoid creating unnecessary arrays

Constructor Summary
Value()
           
Value(java.lang.Object content)
          Simplified version of Value constructor to avoid having to pass a null or "" as the first argument.
Value(java.lang.String tag, java.lang.Object content)
           
 
Method Summary
 void addAttribute(Property prop)
           
 void addAttributes(java.util.Collection<Property> other)
           
 void addValue(Value value)
           
 java.util.Collection<Property> getAttributes()
          Returns an unmodifiable collection of Properties.
 java.lang.Object getContent()
           
 java.lang.String getRawValue()
           
 java.lang.String getRichValue()
           
 java.lang.String getTag()
           
 Value getValue(int index)
          Returns the child value at the given position.
 java.util.Collection<Value> getValues()
          Returns an unmodifiable collection of Values.
 void remove(Value toRemove)
           
 void removeValues(java.util.Collection<Value> toRemove)
           
 void setContent(java.lang.Object content)
           
 void setTag(java.lang.String tag)
           
 void visit(com.ibm.rational.rpe.common.template.visitor.Visitable parent, com.ibm.rational.rpe.common.template.visitor.Visitor v)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Value

public Value()

Value

public Value(java.lang.Object content)
Simplified version of Value constructor to avoid having to pass a null or "" as the first argument.


Value

public Value(java.lang.String tag,
             java.lang.Object content)
Method Detail

getTag

public java.lang.String getTag()

setTag

public void setTag(java.lang.String tag)

getValues

public java.util.Collection<Value> getValues()
Returns an unmodifiable collection of Values. The result is never null.


getValue

public Value getValue(int index)
Returns the child value at the given position. Can throw IndexOutOfBoundsException

Parameters:
index -
Returns:

addValue

public void addValue(Value value)

remove

public void remove(Value toRemove)

removeValues

public void removeValues(java.util.Collection<Value> toRemove)

getContent

public java.lang.Object getContent()

setContent

public void setContent(java.lang.Object content)

getRichValue

public java.lang.String getRichValue()

getRawValue

public java.lang.String getRawValue()

addAttribute

public void addAttribute(Property prop)

getAttributes

public java.util.Collection<Property> getAttributes()
Returns an unmodifiable collection of Properties. The result is never null.


visit

public void visit(com.ibm.rational.rpe.common.template.visitor.Visitable parent,
                  com.ibm.rational.rpe.common.template.visitor.Visitor v)
Specified by:
visit in interface com.ibm.rational.rpe.common.template.visitor.Visitable

addAttributes

public void addAttributes(java.util.Collection<Property> other)