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

au.com.dius.pact.util.Optional Maven / Gradle / Ivy

package au.com.dius.pact.util;

public class Optional {
  private V value = null;

  private Optional(V value) {
    this.value = value;
  }

  private Optional() {
  }

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

  public V get() {
    return value;
  }

  public static  Optional of(V value) {
    return new Optional(value);
  }

  public static  Optional empty() {
    return new Optional();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy