Observable<T> Class
- java.
lang. Object - system.
fabric. Observable<T>
- system.
Type Parameters
- T
Takes a template parameter T.
public class Observable
This class represents an observable object
Constructor Summary
Constructor | Description |
---|---|
Observable() |
Instantiates an system.fabric.Observable object. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addObserver(Observer<? super T> observer)
Adds an observer to the set of observers for this object. |
void |
clearObservers()
Removes all the observers of this class. |
int |
countObservers()
Number of observers of this object. |
List<Observer<? super T>> |
getAllObservers()
Lists all the observers of this object. |
void |
notifyObservers(final Object sender)
Notify all of its observers |
void |
notifyObservers(final Object sender, final T value)
Notify all of its observers |
void |
removeObserver(Observer<? super T> observable)
Removes an observer from the set of observers of this object. |
Constructor Details
Observable
public Observable()
Instantiates an system.fabric.Observable object.
Method Details
addObserver
public void addObserver(Observer observer)
Adds an observer to the set of observers for this object.
Parameters:
clearObservers
public void clearObservers()
Removes all the observers of this class.
countObservers
public int countObservers()
Number of observers of this object.
Returns:
getAllObservers
public List
Lists all the observers of this object.
Returns:
notifyObservers
public void notifyObservers(final Object sender)
Notify all of its observers
Parameters:
notifyObservers
public void notifyObservers(final Object sender, final T value)
Notify all of its observers
Parameters:
removeObserver
public void removeObserver(Observer observable)
Removes an observer from the set of observers of this object.
Parameters:
Observer<U> object as parameter.
Applies to
Azure SDK for Java
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기