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
  • Constructor Details

    • 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 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

      protected void executeSetValue(Property<TValue>.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:
      onDestroy in class ion.Meta.Element