Package arez

Class Component

java.lang.Object
arez.Component
All Implemented Interfaces:
Disposable

@OmitType(unless="arez.enable_native_components") public final class Component extends Object implements Disposable
The component is an abstraction representation of a reactive component within Arez. Each component is made up of one or more of the core Arez reactive elements: ObservableValues, Observers or ComputableValues.
  • Method Details

    • getType

      @Nonnull public String getType()
      Return the component type. This is an opaque string specified by the user.
      Returns:
      the component type.
    • getId

      @Nonnull public Object getId()
      Return the unique id of the component. This will return null for singletons.
      Returns:
      the unique id of the component.
    • getName

      @Nonnull public String getName()
      Return the unique name of the component.
      Returns:
      the name of the component.
    • dispose

      public void dispose()
      Description copied from interface: Disposable
      Dispose the element. See Disposable for a description of the implications.
      Specified by:
      dispose in interface Disposable
    • isDisposed

      public boolean isDisposed()
      Description copied from interface: Disposable
      Return true if dispose() has been called on object.
      Specified by:
      isDisposed in interface Disposable
      Returns:
      true if dispose has been called.
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • isComplete

      public boolean isComplete()
      Return true if the creation of this component is complete.
      Returns:
      true if the creation of this component is complete, false otherwise.
    • complete

      public void complete()
      The toolkit user should call this method when the component is complete. After this method has been invoked the user should not attempt to define any more ObservableValues, Observers or ComputableValues on the component.