JQuantLib v0.1.2-SNAPSHOT API Javadocs

org.jquantlib.quotes
Class Handle.Link

Package class diagram package Handle.Link
java.lang.Object
  extended by org.jquantlib.quotes.Handle.Link
All Implemented Interfaces:
Observable, Observer
Enclosing class:
Handle<T extends Observable>

private class Handle.Link
extends java.lang.Object
implements Observable, Observer


Field Summary
private static java.lang.String EMPTY_HANDLE
           
private  boolean isObserver
           
 T observable
           
 
Constructor Summary
Handle.Link(T observable, boolean isObserver)
           
 
Method Summary
 void addObserver(Observer observer)
          Attaches a observer to the Observable.
 int countObservers()
          Counts how many Observers were attached to this class.
 void deleteObserver(Observer observer)
          Detaches a previously attached observer to the observable.
 void deleteObservers()
          Detaches all previously attached observer to the observable.
 T getLink()
           
 java.util.List<Observer> getObservers()
          Returns list of observers registered with the Observable.
 boolean isEmpty()
           
 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.
 void setLink(T observable, boolean isObserver)
           
 void update(Observable o, java.lang.Object arg)
          This method is called whenever the observed object is changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_HANDLE

private static final java.lang.String EMPTY_HANDLE
See Also:
Constant Field Values

observable

public T extends Observable observable

isObserver

private boolean isObserver
Constructor Detail

Handle.Link

public Handle.Link(T observable,
                   boolean isObserver)
Method Detail

isEmpty

public final boolean isEmpty()

getLink

public final T getLink()

setLink

public final void setLink(T observable,
                          boolean isObserver)

update

public final void update(Observable o,
                         java.lang.Object arg)
Description copied from interface: Observer
This method is called whenever the observed object is changed.

Specified by:
update in interface Observer

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

JQuantLib v0.1.2-SNAPSHOT API Javadocs

Submit a bug or feature

JQuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email mailto:jquant-devel@lists.sourceforge.net. The license is also available online at http://www.jquantlib.org/index.php/LICENSE.TXT.