|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.rational.rpe.common.data.Value
public class Value
This is a wrapper class to hold a collection of data values. The data can be either object values of key-value pairs or a collection of property objects for attributes. This class can be created with the content as an object or as an object associated with a tag for XHTML values. All members are optional and are null initially.
| Constructor Summary | |
|---|---|
Value()
|
|
Value(java.lang.Object content)
|
|
Value(java.lang.String tag,
java.lang.Object content)
|
|
| Method Summary | |
|---|---|
void |
addAttribute(Property prop)
Adds a new property to the attribute collection |
void |
addAttributes(java.util.Collection<Property> other)
Adds a list of new properties to the attribute collection |
void |
addValue(Value value)
Initializes the collection for the first time and inserts the value object into the collection of values. |
java.util.Collection<Property> |
getAttributes()
Returns an unmodifiable collection of properties. |
java.lang.Object |
getContent()
Returns the actual content that was set to the value |
java.lang.String |
getRawValue()
Returns a string with the content of value, if present Returns a string with appended list of strings from the collection of values, if present |
java.lang.String |
getRichValue()
Returns the attribute list for the tag in XHTML format Example - |
java.lang.String |
getTag()
Returns the tag that this value has. |
Value |
getValue(int index)
Returns the value object from the collection present at the index. |
java.util.Collection<Value> |
getValues()
Returns an unmodifiable collection of values. |
void |
remove(Value toRemove)
Removes the value object from the collection of values. |
void |
removeValues(java.util.Collection<Value> toRemove)
Removes all the value objects that are passed as input from the collection of values. |
void |
setContent(java.lang.Object content)
Set the actual content to the value |
void |
setTag(java.lang.String tag)
Sets the tag to this class |
void |
visit(Visitable parent,
com.ibm.rational.rpe.common.template.visitor.Visitor v)
Visits the current visitable object |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Value()
public Value(java.lang.Object content)
public Value(java.lang.String tag,
java.lang.Object content)
| Method Detail |
|---|
public java.lang.String getTag()
public void setTag(java.lang.String tag)
public java.util.Collection<Value> getValues()
public Value getValue(int index)
The - index as an int
java.lang.IndexOutOfBoundsExceptionpublic void addValue(Value value)
The - Value to be added to the Collectionpublic void remove(Value toRemove)
The - Value to be added to the Collectionpublic void removeValues(java.util.Collection<Value> toRemove)
Collection - of Value objects to be removedpublic java.lang.Object getContent()
public void setContent(java.lang.Object content)
Content - of the Value as an Objectpublic java.lang.String getRichValue()
public java.lang.String getRawValue()
public void addAttribute(Property prop)
Property - Propertypublic java.util.Collection<Property> getAttributes()
public void visit(Visitable parent,
com.ibm.rational.rpe.common.template.visitor.Visitor v)
visit in interface Visitableparent - - (optional) the parent visitable object that triggered the visit of this objectv - - the visitorpublic void addAttributes(java.util.Collection<Property> other)
Collection - containing Property Property
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||