aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/utils/IObserver.java
blob: c7842aac6d06cad58b4c7d166159e2729adda5ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package cgeo.geocaching.utils;

/**
 * Observer interface.
 * <p/>
 * An observer will receive updates about the observed object (implementing the {@link ISubject} interface)
 * through its {@link #update(T)} method.
 *
 * @param <T>
 *         the kind of data to observe
 */
public interface IObserver<T> {

    /**
     * Called when an observed object has updated its data.
     *
     * @param data
     *         the updated data
     */
    void update(final T data);

}