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

fr.vergne.pester.util.observer.OccurrenceObserver Maven / Gradle / Ivy

The newest version!
package fr.vergne.pester.util.observer;

public class OccurrenceObserver {
	private T value;

	public void occurs(T value) {
		if (this.value == null) {
			this.value = value;
		}
	}

	public boolean hasOccurred() {
		return value != null;
	}

	public T getFirstOccurrence() {
		return value;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy