public class MetaProperty extends java.lang.Object implements java.io.Serializable, CopyConstructorClonable
A WellKnownMetaProperty is a special typed meta property defining a common setting. Ideally each stored setting would have a defined WellKnownMetaProperty, since they have utilities to make it easier to retrieve/set setting values in a type safe way.
Not-yet-implemented idea: A MetaProperty can be marked as Immutable, in which case its value cannot be changed and it cannot be altered/replaced/removed from a collection. The purpose of of immutable properties is to allow subclasses to enforce certain settings. By having immutable settings we could easily merge between StandardGroup and HistoricalGroup without worry. Another possible flag is REQUIRED (can't be removed)
TypedMetaProperty
,
WellKnownMetaProperty
,
Serialized FormModifier | Constructor and Description |
---|---|
|
MetaProperty() |
protected |
MetaProperty(MetaProperty copy) |
protected |
MetaProperty(java.lang.String name,
java.lang.Object value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getName() |
java.lang.Object |
getValue() |
<T> T |
getValueAs(java.lang.Class<T> clazz) |
void |
setName(java.lang.String name) |
void |
setValue(java.lang.Object value) |
java.lang.String |
toString() |
public MetaProperty()
protected MetaProperty(java.lang.String name, java.lang.Object value)
protected MetaProperty(MetaProperty copy)
public final java.lang.String getName()
public void setName(java.lang.String name)
public <T> T getValueAs(java.lang.Class<T> clazz)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object