org.jquantlib.util
Interface Observable
-
- All Known Subinterfaces:
- AffineModel, Bond.Engine, OneAssetOption.Engine, PiecewiseCurve<I>, PricingEngine, TermStructure, TermStructureConsistentModel, Traits.Curve, VanillaOption.Engine, YieldTermStructure
- All Known Implementing Classes:
- AbstractTermStructure, AbstractYieldTermStructure, AnalyticBarrierEngine, AnalyticContinuousGeometricAveragePriceAsianEngine, AnalyticDiscreteGeometricAveragePriceAsianEngine, AnalyticDividendEuropeanEngine, AnalyticEuropeanEngine, AUDLibor, AverageBMACoupon, AverageBMACouponPricer, BaroneAdesiWhaleyApproximationEngine, BarrierOption, BarrierOption.EngineImpl, BatesDoubleExpModel, BatesDoubleExpModel.BatesDoubleExpDetJumpModel, BatesModel, BinomialConvertibleEngine, BinomialVanillaEngine, BjerksundStenslandApproximationEngine, BlackConstantVol, BlackIborCouponPricer, BlackKarasinski, BlackScholesMertonProcess, BlackVarianceCurve, BlackVarianceSurface, BlackVarianceTermStructure, BlackVolatilityTermStructure, BlackVolTermStructure, BMAIndex, BMASwap, BMASwapRateHelper, Bond, Bond.EngineImpl, BootstrapHelper, CADLibor, CADLiborON, CalibratedModel, CalibrationHelper, Callability, CapFloor, CapHelper, CapletVarianceCurve, CappedFlooredCmsCoupon, CappedFlooredCoupon, CappedFlooredIborCoupon, CapVolatilityStructure, CashFlow, Cdor, CHFLibor, ChfLiborSwapIsdaFix, CmsCoupon, CmsCouponPricer, CmsRateBond, ConstantOptionletVolatility, ContinuousAveragingAsianOption, ContinuousAveragingAsianOption.EngineImpl, ConvertibleBond, ConvertibleBondOption, ConvertibleBondOption.EngineImpl, ConvertibleFixedCouponBond, ConvertibleFloatingRateBond, ConvertibleZeroCouponBond, Coupon, CoxIngersollRoss, DailyTenorCHFLibor, DailyTenorEuribor, DailyTenorEuribor365, DailyTenorEURLibor, DailyTenorEURLiborON, DailyTenorGBPLibor, DailyTenorJPYLibor, DailyTenorLibor, DailyTenorUSDLibor, Date, DefaultObservable, DepositRateHelper, DiscountingBondEngine, DiscountingSwapEngine, DiscreteAveragingAsianOption, DiscreteAveragingAsianOption.EngineImpl, Dividend, DividendVanillaOption, DividendVanillaOption.EngineImpl, DKKLibor, EUHICP, Euribor, Euribor10M, Euribor11M, Euribor1M, Euribor1Y, Euribor2M, Euribor2W, Euribor365, Euribor365_10M, Euribor365_11M, Euribor365_1M, Euribor365_1Y, Euribor365_2M, Euribor365_2W, Euribor365_3M, Euribor365_3W, Euribor365_4M, Euribor365_5M, Euribor365_6M, Euribor365_7M, Euribor365_8M, Euribor365_9M, Euribor365_SW, Euribor3M, Euribor3W, Euribor4M, Euribor5M, Euribor6M, Euribor7M, Euribor8M, Euribor9M, EuriborSW, EuriborSwapIfrFix, EuriborSwapIsdaFixA, EuriborSwapIsdaFixB, EURLibor, EURLibor10M, EURLibor11M, EURLibor1M, EURLibor1Y, EURLibor2M, EURLibor2W, EURLibor3M, EURLibor4M, EURLibor5M, EURLibor6M, EURLibor7M, EURLibor8M, EURLibor9M, EURLiborSW, EurLiborSwapIfrFix, EurLiborSwapIsdaFixA, EurLiborSwapIsdaFixB, EuropeanOption, Event, ExtendedCoxIngersollRoss, FDAmericanEngine, FDBermudanEngine, FDDividendAmericanEngine, FDDividendEuropeanEngine, FDEngineAdapter, FDEuropeanEngine, FDShoutEngine, FixedDividend, FixedRateBond, FixedRateBondHelper, FixedRateCoupon, FlatForward, FlatSmileSection, FloatingRateBond, FloatingRateCoupon, FloatingRateCouponPricer, Forward, ForwardMeasureProcess, ForwardMeasureProcess1D, ForwardRateAgreement, ForwardRateStructure, ForwardSpreadedTermStructure, FractionalDividend, FraRateHelper, FuturesRateHelper, G2, GBPLibor, GBPLiborON, GbpLiborSwapIsdaFix, GeneralizedBlackScholesProcess, GenericEngine, GenericModelEngine, GeometricBrownianMotionProcess, Handle, HestonModel, HestonProcess, HullWhite, HullWhiteForwardProcess, HullWhiteProcess, IborCoupon, IborCouponPricer, IborIndex, ImpliedTermStructure, ImpliedVolTermStructure, Index, InflationIndex, InflationTermStructure, Instrument, IntegralEngine, InterestRateIndex, InterpolatedDiscountCurve, InterpolatedForwardCurve, InterpolatedZeroCurve, Jibar, JPYLibor, JpyLiborSwapIsdaFixAm, JpyLiborSwapIsdaFixPm, JumpDiffusionEngine, JuQuadraticApproximationEngine, LazyObject, Libor, LiborForwardModelProcess, LocalConstantVol, LocalVolCurve, LocalVolSurface, LocalVolTermStructure, Merton76Process, NZDLibor, ObservableValue, OneAssetOption, OneAssetOption.EngineImpl, OneFactorAffineModel, OneFactorModel, Option, OptionletVolatilityStructure, OrnsteinUhlenbeckProcess, PiecewiseYieldCurve, Quote, RateHelper, RelativeDateRateHelper, RelinkableHandle, SEKLibor, ShortRateModel, SimpleCashFlow, SimpleQuote, SmileSection, SoftCallability, StochasticProcess, StochasticProcess1D, StochasticProcessArray, Stock, Swap, Swap.EngineImpl, SwapIndex, SwapRateHelper, SwaptionHelper, SwaptionVolatilityStructure, TermStructureConsistentModel, TermStructureConsistentModelClass, Tibor, TRLibor, TwoFactorModel, UKRPI, USDLibor, USDLiborON, UsdLiborSwapIsdaFixAm, UsdLiborSwapIsdaFixPm, VanillaOption, VanillaOption.EngineImpl, VanillaSwap, Vasicek, VolatilityTermStructure, WeakReferenceObservable, YoYInflationIndex, YoYInflationTermStructure, YYEUHICP, YYEUHICPr, YYUKRPI, YYUKRPIr, ZeroCouponBond, ZeroInflationIndex, ZeroInflationTermStructure, ZeroSpreadedTermStructure, ZeroYieldStructure, Zibor
public interface ObservableThis interface is intended to provide more flexibility to complex object models when multiple inheritance is needed.By providing Observable as an interface, instead of the JDK'a
Observableclass, client classes have the option to mimic multiple inheritance by means of a delegate pattern which uses an inner private class which implements this interface.This class is based on the work done by Martin Fischer, with only minor changes. See references below.
-
-
Method Summary
All Methods Instance Methods Abstract 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.java.util.List<Observer>getObservers()Returns list of observers registered with the Observable.voidnotifyObservers()Notifies all attached observers about changes in the observable.voidnotifyObservers(java.lang.Object arg)Notifies all attached observers about changes in the observable.
-
-
-
Method Detail
-
addObserver
void addObserver(Observer observer)
Attaches a observer to the Observable. After attachment the observer gets informed about changes in the Observable.- Parameters:
observer- The observer to attach to the observable
-
countObservers
int countObservers()
Counts how many Observers were attached to this class.- Returns:
- the number of Observers
- See Also:
Observer
-
getObservers
java.util.List<Observer> getObservers()
Returns list of observers registered with the Observable. List returned is unmodifiable list.- Returns:
- list of observers
-
deleteObserver
void deleteObserver(Observer observer)
Detaches a previously attached observer to the observable. After detachment the observer does no longer receive change notifications from the observable.- Parameters:
observer- The observer to detach from the observable
-
deleteObservers
void deleteObservers()
Detaches all previously attached observer to the observable. After detachment observers do not longer receive change notifications from the observable.
-
notifyObservers
void notifyObservers()
Notifies all attached observers about changes in the observable.
-
notifyObservers
void notifyObservers(java.lang.Object arg)
Notifies all attached observers about changes in the observable.- Parameters:
arg- an arbitrary Object to be passed to the Observer
-
-
DataMelt 3.0 © DataMelt by jWork.ORG