|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Describes an object that can be annotated with arbitrary name-value pairs
This code is Public Domain.
Method Summary | |
void |
add(Annotable other)
Copies properties from one Annotable object into
another. |
void |
add(java.lang.String property,
java.lang.Object value)
Adds a property to this object. |
void |
addAsList(java.lang.String property,
java.lang.Object value)
Adds a list property to this object. |
java.lang.Object |
get(java.lang.String property)
Gets a named property. |
java.util.List |
getAsList(java.lang.String property)
Gets a named property as a List. |
java.util.Map |
getProperties()
Get the list of properties defined in this object |
boolean |
has(java.lang.String property)
Tests whether this Annotable has a given property |
Method Detail |
public void add(java.lang.String property, java.lang.Object value)
property
- the property namevalue
- the value of that propertypublic void addAsList(java.lang.String property, java.lang.Object value)
public void add(Annotable other)
Annotable
object into
another. Existing properties in this object will be overwritten from
those defined in the other.other
- the object to copy properties frompublic java.lang.Object get(java.lang.String property)
property
- the name of the propertynull
if it is not setpublic java.util.List getAsList(java.lang.String property)
property
- the name of the propertypublic boolean has(java.lang.String property)
Annotable
has a given propertyproperty
- the property to checktrue
if the property has a value, false
otherwisepublic java.util.Map getProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |