All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zipwhip.concurrent.ObserverAdapter Maven / Gradle / Ivy

The newest version!
package com.zipwhip.concurrent;

import com.zipwhip.events.Observer;

/**
* Created with IntelliJ IDEA.
* User: Michael
* Date: 9/10/12
* Time: 6:16 PM
* To change this template use File | Settings | File Templates.
*/
public class ObserverAdapter implements Observer {

    private final Observer observer;

    public ObserverAdapter(Observer observer) {
        this.observer = observer;

        if (this.observer == null) {
            throw new IllegalArgumentException("Observer cannot be null!");
        }
    }

    @Override
    public void notify(Object sender, T item) {
        observer.notify(sender, item);
    }

    public Observer getObserver() {
        return observer;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy