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 Summary
Modifier and TypeMethodDescriptionvoidcomplete()The toolkit user should call this method when the component is complete.voiddispose()Dispose the element.getId()Return the unique id of the component.getName()Return the unique name of the component.getType()Return the component type.booleanReturn true if the creation of this component is complete.booleanReturn true if dispose() has been called on object.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface arez.Disposable
isNotDisposed
-
Method Details
-
getType
Return the component type. This is an opaque string specified by the user.- Returns:
- the component type.
-
getId
Return the unique id of the component. This will return null for singletons.- Returns:
- the unique id of the component.
-
getName
Return the unique name of the component.- Returns:
- the name of the component.
-
dispose
Description copied from interface:DisposableDispose the element. SeeDisposablefor a description of the implications.- Specified by:
disposein interfaceDisposable
-
isDisposed
Description copied from interface:DisposableReturn true if dispose() has been called on object.- Specified by:
isDisposedin interfaceDisposable- Returns:
- true if dispose has been called.
-
toString
-
isComplete
Return true if the creation of this component is complete.- Returns:
- true if the creation of this component is complete, false otherwise.
-
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 moreObservableValues,Observers orComputableValues on the component.
-