Package ion.Core
Class Property<TValue>
- java.lang.Object
-
- ion.Meta.Element
-
- ion.Core.Property<TValue>
-
- Type Parameters:
TValue- the specific type of the attribute
public class Property<TValue> extends ion.Meta.ElementA Property is an Element that represents an attribute of a specific type.- Author:
- GAIPS
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classProperty.ChooseFirstHandlerprotected classProperty.ChooseLastHandlerprotected classProperty.ChooseRandomHandlerprotected classProperty.SetValuestatic classProperty.SetValuePolicy
-
Constructor Summary
Constructors Constructor Description Property()Creates a Property with the default value null.Property(Property.SetValuePolicy policy)Creates a Property with a particular policy to handle conflicting SetValues requestsProperty(TValue value)Creates a Property with a particular initial value.Property(TValue value, Property.SetValuePolicy policy)Creates a Property with a particular initial value and a policy to handle conflicting SetValues requests
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidchangeValueChooseFirst(ion.Meta.IReadOnlyQueueSet<ion.Meta.Request> requests)Change value policy that chooses the first request set value.protected voidchangeValueChooseLast(ion.Meta.IReadOnlyQueueSet<ion.Meta.Request> requests)Change value policy that chooses the last request set value.protected voidchangeValueChooseRandom(ion.Meta.IReadOnlyQueueSet<ion.Meta.Request> requests)Change value policy that chooses a random request set value.protected voidexecuteSetValue(Property.SetValue request)TValuegetValue()Gets the Value of the Property.voidonDestroy()voidsetValue(TValue value)Sets the value of the property.
-
-
-
Constructor Detail
-
Property
public Property()
Creates a Property with the default value null.
-
Property
public Property(TValue value)
Creates a Property with a particular initial value.- Parameters:
value-
-
Property
public Property(Property.SetValuePolicy policy)
Creates a Property with a particular policy to handle conflicting SetValues requests
-
Property
public Property(TValue value, Property.SetValuePolicy policy)
Creates a Property with a particular initial value and a policy to handle conflicting SetValues requests
-
-
Method Detail
-
changeValueChooseFirst
protected void changeValueChooseFirst(ion.Meta.IReadOnlyQueueSet<ion.Meta.Request> requests)
Change value policy that chooses the first request set value.- Parameters:
requests- the set of request queues to be processed
-
changeValueChooseLast
protected void changeValueChooseLast(ion.Meta.IReadOnlyQueueSet<ion.Meta.Request> requests)
Change value policy that chooses the last request set value.- Parameters:
requests- the set of request queues to be processed
-
changeValueChooseRandom
protected void changeValueChooseRandom(ion.Meta.IReadOnlyQueueSet<ion.Meta.Request> requests)
Change value policy that chooses a random request set value.- Parameters:
requests- the set of request queues to be processed
-
executeSetValue
protected void executeSetValue(Property.SetValue request)
-
getValue
public TValue getValue()
Gets the Value of the Property.- Returns:
- the current Value of the Property
-
setValue
public void setValue(TValue value)
Sets the value of the property. It does not set the value directly, it schedules a request to change the value.- Parameters:
value- the value to be set
-
onDestroy
public void onDestroy()
- Specified by:
onDestroyin classion.Meta.Element
-
-