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.Element
A Property is an Element that represents an attribute of a specific type.
- Author:
- GAIPS
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected final classprotected final classprotected final classprotected final classstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionProperty()Creates a Property with the default value null.Property(Property.SetValuePolicy policy) Creates a Property with a particular policy to handle conflicting SetValues requestsCreates 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
Modifier and TypeMethodDescriptionprotected 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<TValue>.SetValue request) getValue()Gets the Value of the Property.voidvoidSets the value of the property.Methods inherited from class ion.Meta.Element
destroy, getEventFilters, getEventHandlers, getRequestFilters, getRequestHandlers, getSimulation, getUID, raise, schedule, wasDestroyed
-
Constructor Details
-
Property
public Property()Creates a Property with the default value null. -
Property
Creates a Property with a particular initial value.- Parameters:
value-
-
Property
Creates a Property with a particular policy to handle conflicting SetValues requests -
Property
Creates a Property with a particular initial value and a policy to handle conflicting SetValues requests
-
-
Method Details
-
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
-
getValue
Gets the Value of the Property.- Returns:
- the current Value of the Property
-
setValue
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
-