Enum Class DepType

java.lang.Object
java.lang.Enum<DepType>
arez.annotations.DepType
All Implemented Interfaces:
Serializable, Comparable<DepType>, Constable

public enum DepType extends Enum<DepType>
Enumeration that describes the types of dependencies supported by an Observer or a ComputableValue.
  • Enum Constant Details

    • AREZ

      public static final DepType AREZ
      The reactive element MUST have at least one dependency on an ObservableValue. This means that the computable or observed method must invoke ObservableValue.reportObserved() at least once within the scope of the method.
    • AREZ_OR_NONE

      public static final DepType AREZ_OR_NONE
      The reactive element may have dependencies on zero or more ObservableValue instances. Using this dependency type also allows for the scenario where the computable or observed does not invoke ObservableValue.reportObserved() within the scope of the method. The computable or observed will not be re-scheduled by the runtime when there are no dependencies. (This is sometimes acceptable, particularly during when a collection of components are being disposed over multiple scheduling rounds).
    • AREZ_OR_EXTERNAL

      public static final DepType AREZ_OR_EXTERNAL
      The reactive element may have zero or more dependencies on ObservableValue instances and/or may have dependencies on non-arez elements. The application can invoke Observer.reportStale() or ComputableValue.reportPossiblyChanged() to indicate non-arez dependency has changed.
  • Method Details

    • values

      public static DepType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DepType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null