class Result implements ImmutableBean, Serializable {

  public void ifFailure(Consumer<Failure> consumer) {
    if (failure != null) {
      consumer.accept(failure);
    }
  }

  private  Result(T value);
  private  Result(Failure failure);
  private  Result(
      T value,
      Failure failure);

}