Documentation of 'org.jquantlib.quotes.Handle' Java class
Handle
org.jquantlib.quotes

Class Handle<T extends Observable>

  • All Implemented Interfaces:
    Observable
    Direct Known Subclasses:
    RelinkableHandle


    public class Handle<T extends Observable>
    extends java.lang.Object
    implements Observable
    Shared handle to an observable

    All copies of an instance of this class refer to the same observable by means of a relinkable weak reference. When such pointer is relinked to another observable, the change will be propagated to all the copies.

    • Constructor Summary

      Constructors 
      Constructor and Description
      Handle() 
      Handle(T observable) 
      Handle(T observable, boolean registerAsObserver) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addObserver(Observer observer)
      Attaches a observer to the Observable.
      int countObservers()
      Counts how many Observers were attached to this class.
      T currentLink() 
      void deleteObserver(Observer observer)
      Detaches a previously attached observer to the observable.
      void deleteObservers()
      Detaches all previously attached observer to the observable.
      boolean empty() 
      java.util.List<Observer> getObservers()
      Returns list of observers registered with the Observable.
      void linkTo(T observable) 
      void linkTo(T observable, boolean registerAsObserver) 
      void notifyObservers()
      Notifies all attached observers about changes in the observable.
      void notifyObservers(java.lang.Object arg)
      Notifies all attached observers about changes in the observable.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Handle

        public Handle()
      • Handle

        public Handle(T observable)
      • Handle

        public Handle(T observable,
                      boolean registerAsObserver)
    • Method Detail

      • empty

        public final boolean empty()
      • currentLink

        public final T currentLink()
      • linkTo

        public void linkTo(T observable)
      • linkTo

        public void linkTo(T observable,
                           boolean registerAsObserver)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • addObserver

        public final void addObserver(Observer observer)
        Description copied from interface: Observable
        Attaches a observer to the Observable. After attachment the observer gets informed about changes in the Observable.
        Specified by:
        addObserver in interface Observable
        Parameters:
        observer - The observer to attach to the observable
      • countObservers

        public final int countObservers()
        Description copied from interface: Observable
        Counts how many Observers were attached to this class.
        Specified by:
        countObservers in interface Observable
        Returns:
        the number of Observers
        See Also:
        Observer
      • deleteObserver

        public final void deleteObserver(Observer observer)
        Description copied from interface: Observable
        Detaches a previously attached observer to the observable. After detachment the observer does no longer receive change notifications from the observable.
        Specified by:
        deleteObserver in interface Observable
        Parameters:
        observer - The observer to detach from the observable
      • notifyObservers

        public final void notifyObservers()
        Description copied from interface: Observable
        Notifies all attached observers about changes in the observable.
        Specified by:
        notifyObservers in interface Observable
      • notifyObservers

        public final void notifyObservers(java.lang.Object arg)
        Description copied from interface: Observable
        Notifies all attached observers about changes in the observable.
        Specified by:
        notifyObservers in interface Observable
        Parameters:
        arg - an arbitrary Object to be passed to the Observer
      • deleteObservers

        public final void deleteObservers()
        Description copied from interface: Observable
        Detaches all previously attached observer to the observable. After detachment observers do not longer receive change notifications from the observable.
        Specified by:
        deleteObservers in interface Observable
      • getObservers

        public final java.util.List<Observer> getObservers()
        Description copied from interface: Observable
        Returns list of observers registered with the Observable. List returned is unmodifiable list.
        Specified by:
        getObservers in interface Observable
        Returns:
        list of observers

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.