public class PropertyInstance<T> extends Object implements org.qi4j.api.property.Property<T>
PropertyInstance
represents a property.Modifier and Type | Field and Description |
---|---|
protected PropertyInfo |
model |
protected T |
value |
Constructor and Description |
---|
PropertyInstance(PropertyInfo model,
T aValue)
Construct an instance of
PropertyInstance with the specified arguments. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Perform equals with
o argument. |
T |
get()
Returns this property value.
|
int |
hashCode()
Calculate hash code.
|
void |
prepareBuilderState(PropertyModel propertyDescriptor) |
void |
prepareToBuild(PropertyModel propertyDescriptor) |
PropertyInfo |
propertyInfo() |
void |
set(T aNewValue)
Sets this property value.
|
void |
setPropertyInfo(PropertyInfo model) |
String |
toString()
Returns the value as string.
|
protected volatile T value
protected PropertyInfo model
public PropertyInstance(PropertyInfo model, T aValue)
PropertyInstance
with the specified arguments.model
- The property model. This argument must not be null
.aValue
- The property value.public PropertyInfo propertyInfo()
public void setPropertyInfo(PropertyInfo model)
model
- The property model. This argument must not be null
.public T get()
get
in interface org.qi4j.api.property.Property<T>
public void set(T aNewValue)
set
in interface org.qi4j.api.property.Property<T>
aNewValue
- The new value.public boolean equals(Object o)
o
argument.
The definition of equals() for the Property is that if both the state and descriptor are equal, then the properties are equal.
public int hashCode()
public String toString()
public void prepareToBuild(PropertyModel propertyDescriptor)
public void prepareBuilderState(PropertyModel propertyDescriptor)