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

org.pitest.mutationtest.tooling.AnalysisResult Maven / Gradle / Ivy

There is a newer version: 1.17.1
Show newest version
package org.pitest.mutationtest.tooling;

import java.util.Optional;

public final class AnalysisResult {

  private final Optional statistics;
  private final Optional          error;

  private AnalysisResult(final CombinedStatistics statistics,
      final Exception error) {
    this.statistics = Optional.ofNullable(statistics);
    this.error = Optional.ofNullable(error);
  }

  public static AnalysisResult success(final CombinedStatistics statistics) {
    return new AnalysisResult(statistics, null);
  }

  public static AnalysisResult fail(final Exception error) {
    return new AnalysisResult(null, error);
  }

  public Optional getStatistics() {
    return this.statistics;
  }

  public Optional getError() {
    return this.error;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy