| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class encapsulates content information in the form:
this has an attribute with a value of value
In general, the information contained within a Content object is
either: a) Other Content objects (forming a tree like structure);
b) Double objects; c) Long objects; or d) String objects (anything
which doesn't fit catergories a-c).
Constructor Summary | |
Content() Creates a completely blank Content object with no attributes and no name | |
Content(String name) Creates a completely blank Content object with the given name | |
Content(Map content) Constructs a Content object using the given Map as a basis for the internal data structure. | |
Content(Content c) This Constructor will clone the structure of the Content object given in a manner which completely decouples this from the given Content object (i.e. |
Method Summary | |
synchronized void | addAttribute(String name, Object value) This method associates the specified value with the specified attribute. |
synchronized void | addAttribute(String name, List value) This method associates the specified values with the specified attribute. |
Object | getAttribute(String name) This method returns the value to which the given attribute maps to. |
Set | getAttributeNames() This method returns a Set of the attribute names contained in this Content object. |
String | getName() Method to get the name of this Content object |
boolean | isEmpty() This method indicates if this Content object has no attributes associated with it. |
synchronized void | removeAttribute(String name) This method removes the mapping for this attribute from this if it is present. |
synchronized void | setAttribute(String name, Object value) This method associates the specified value with the specified attribute. |
synchronized void | setAttribute(String name, List values) This method associates the specified values with the specified attribute. |
String | toString(String pre) This is a toString method which returns a String representation of this, each line pre-fixed with the given String. |
String | toString() This is the public toString method which returns a String. |
Constructor Detail |
public Content()
public Content(String name)
public Content(Map content)
public Content(Content c)
Method Detail |
public synchronized void addAttribute(String name, Object value)
addAttribute() does not overwrite attributes. It is suggested that if this is the desired operation, setAttribute() is used instead.
public synchronized void addAttribute(String name, List value)
addAttribute() does not overwrite attributes. It is suggested that if this is the desired operation, setAttribute() is used instead.
public Object getAttribute(String name)
public Set getAttributeNames()
public String getName()
public boolean isEmpty()
public synchronized void removeAttribute(String name)
public synchronized void setAttribute(String name, Object value)
public synchronized void setAttribute(String name, List values)
public String toString(String pre)
public String toString()
Association Links |
to Class java.lang.String
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |