org.jquantlib.pricingengines
Class GenericEngine<A extends Instrument.Arguments,R extends Instrument.Results>
- java.lang.Object
-
- org.jquantlib.pricingengines.GenericEngine<A,R>
-
- Type Parameters:
A- is an parameterized Arguments objectR- is an parameterized Results object
- All Implemented Interfaces:
- PricingEngine, Observable, Observer
- Direct Known Subclasses:
- BarrierOption.EngineImpl, Bond.EngineImpl, ContinuousAveragingAsianOption.EngineImpl, ConvertibleBondOption.EngineImpl, DiscreteAveragingAsianOption.EngineImpl, GenericModelEngine, OneAssetOption.EngineImpl, Swap.EngineImpl
public abstract class GenericEngine<A extends Instrument.Arguments,R extends Instrument.Results> extends java.lang.Object implements PricingEngine, Observer
This is a generic definition of a PriceEngine which takes its arguments from anArgumentsstructure and returns its results in aResultsstructure.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jquantlib.pricingengines.PricingEngine
PricingEngine.Arguments, PricingEngine.Results
-
-
Field Summary
-
Fields inherited from interface org.jquantlib.pricingengines.PricingEngine
PRICING_ENGINE_NOT_SET
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddObserver(Observer observer)Attaches a observer to the Observable.intcountObservers()Counts how many Observers were attached to this class.voiddeleteObserver(Observer observer)Detaches a previously attached observer to the observable.voiddeleteObservers()Detaches all previously attached observer to the observable.AgetArguments()java.util.List<Observer>getObservers()Returns list of observers registered with the Observable.RgetResults()voidnotifyObservers()Notifies all attached observers about changes in the observable.voidnotifyObservers(java.lang.Object arg)Notifies all attached observers about changes in the observable.voidreset()voidupdate()This method is called whenever the observed object is changed.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jquantlib.pricingengines.PricingEngine
calculate
-
-
-
-
Method Detail
-
getArguments
public final A getArguments()
- Specified by:
getArgumentsin interfacePricingEngine
-
getResults
public final R getResults()
- Specified by:
getResultsin interfacePricingEngine
-
reset
public void reset()
- Specified by:
resetin interfacePricingEngine
-
update
public void update()
Description copied from interface:ObserverThis method is called whenever the observed object is changed.- Specified by:
updatein interfacePricingEngine- Specified by:
updatein interfaceObserver
-
addObserver
public final void addObserver(Observer observer)
Description copied from interface:ObservableAttaches a observer to the Observable. After attachment the observer gets informed about changes in the Observable.- Specified by:
addObserverin interfaceObservable- Parameters:
observer- The observer to attach to the observable
-
countObservers
public final int countObservers()
Description copied from interface:ObservableCounts how many Observers were attached to this class.- Specified by:
countObserversin interfaceObservable- Returns:
- the number of Observers
- See Also:
Observer
-
deleteObserver
public final void deleteObserver(Observer observer)
Description copied from interface:ObservableDetaches a previously attached observer to the observable. After detachment the observer does no longer receive change notifications from the observable.- Specified by:
deleteObserverin interfaceObservable- Parameters:
observer- The observer to detach from the observable
-
notifyObservers
public final void notifyObservers()
Description copied from interface:ObservableNotifies all attached observers about changes in the observable.- Specified by:
notifyObserversin interfaceObservable
-
notifyObservers
public final void notifyObservers(java.lang.Object arg)
Description copied from interface:ObservableNotifies all attached observers about changes in the observable.- Specified by:
notifyObserversin interfaceObservable- Parameters:
arg- an arbitrary Object to be passed to the Observer
-
deleteObservers
public final void deleteObservers()
Description copied from interface:ObservableDetaches all previously attached observer to the observable. After detachment observers do not longer receive change notifications from the observable.- Specified by:
deleteObserversin interfaceObservable
-
getObservers
public final java.util.List<Observer> getObservers()
Description copied from interface:ObservableReturns list of observers registered with the Observable. List returned is unmodifiable list.- Specified by:
getObserversin interfaceObservable- Returns:
- list of observers
-
-
DataMelt 3.0 © DataMelt by jWork.ORG