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

org.quicktheories.impl.Falsification Maven / Gradle / Ivy

The newest version!
package org.quicktheories.impl;

import java.util.Optional;

final class Falsification {

  private final Optional cause;
  private final T value;

  Falsification(T value, Optional cause) {
    this.value = value;
    this.cause = cause;
  }

  static  Falsification fromException(Throwable t, T value) {
    return new Falsification<>(value, Optional.of(t));
  }

  static  Falsification fromProperty(T value) {
    return new Falsification<>(value, Optional.empty());
  }

  T value() {
    return this.value;
  }

  Optional cause() {
    return cause;
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy