fr.vergne.pester.util.observer.OccurrenceObserver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pester-core Show documentation
Show all versions of pester-core Show documentation
Implementation of the Pester library.
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;
}
}