Interface Adapter

All Known Subinterfaces:
Adapter.Internal
All Known Implementing Classes:
AdapterImpl, SingletonAdapterImpl

public interface Adapter
A receiver of notifications. An adapter is typically associated with a Notifier via an AdapterFactory.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An internal interface implemented by adapters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the target from which the adapter receives notification.
    boolean
    Returns whether the adapter is of the given type.
    void
    Notifies that a change to some feature has occurred.
    void
    setTarget(Notifier newTarget)
    Sets the target from which the adapter will receive notification.
  • Method Details

    • notifyChanged

      void notifyChanged(Notification notification)
      Notifies that a change to some feature has occurred.
      Parameters:
      notification - a description of the change.
    • getTarget

      Notifier getTarget()
      Returns the target from which the adapter receives notification. In general, an adapter may be shared by more than one notifier.
      Returns:
      the target notifier.
      See Also:
    • setTarget

      void setTarget(Notifier newTarget)
      Sets the target from which the adapter will receive notification. This method is only to be called by a notifier when this adapter is added to or removed from its adapter list. In general, an adapter may be shared by more than one notifier.
      Parameters:
      newTarget - the new notifier.
      See Also:
    • isAdapterForType

      boolean isAdapterForType(Object type)
      Returns whether the adapter is of the given type. In general, an adapter may be the adapter for many types.
      Parameters:
      type - the type.
      Returns:
      whether the adapter is of the given type.
      See Also: