Observable<T> 类

定义

This class represents an observable object

public class Observable<T>

类型参数

T

Takes a template parameter T.

继承
java.lang.Object
Observable<T>

构造函数

Observable()

Instantiates an system.fabric.Observable object.

方法

addObserver(Observer<? super T> observer)

Adds an observer to the set of observers for this object.

clearObservers()

Removes all the observers of this class.

countObservers()

Number of observers of this object.

getAllObservers()

Lists all the observers of this object.

notifyObservers(final Object sender)

Notify all of its observers

notifyObservers(final Object sender, final T value)

Notify all of its observers

removeObserver(Observer<? super T> observable)

Removes an observer from the set of observers of this object.

适用于