From 2485ac4cf627ce73c7bcd0029581d277e59cf807 Mon Sep 17 00:00:00 2001 From: efischer Date: Sun, 27 Feb 2022 16:15:26 -0600 Subject: [PATCH] Add getters to MatchingResult --- src/main/java/MatchingResult.java | 36 ++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/src/main/java/MatchingResult.java b/src/main/java/MatchingResult.java index 5942c82..4502f51 100644 --- a/src/main/java/MatchingResult.java +++ b/src/main/java/MatchingResult.java @@ -21,15 +21,15 @@ public class MatchingResult { * well populations * * total alphas found * * total betas found * - * high overlap threshold - * low overlap threshold - * maximum occupancy difference - * minimum overlap percent - * pairing attempt rate - * correct pairing count - * incorrect pairing count - * pairing error rate - * simulation time + * high overlap threshold * + * low overlap threshold * + * maximum occupancy difference * + * minimum overlap percent * + * pairing attempt rate * + * correct pairing count * + * incorrect pairing count * + * pairing error rate * + * simulation time (seconds) */ this.metadata = metadata; this.comments = new ArrayList<>(); @@ -91,6 +91,22 @@ public class MatchingResult { return Integer.parseInt(metadata.get("total beta count")); } - //put in the rest of these methods following the same pattern + public Integer getHighOverlapThreshold() { return Integer.parseInt(metadata.get("high overlap threshold"));} + + public Integer getLowOverlapThreshold() { return Integer.parseInt(metadata.get("low overlap threshold"));} + + public Integer getMaxOccupancyDifference() { return Integer.parseInt(metadata.get("maximum occupancy difference"));} + + public Integer getMinOverlapPercent() { return Integer.parseInt(metadata.get("minimum overlap percent"));} + + public Double getPairingAttemptRate() { return Double.parseDouble(metadata.get("pairing attempt rate"));} + + public Integer getCorrectPairingCount() { return Integer.parseInt(metadata.get("correct pairing count"));} + + public Integer getIncorrectPairingCount() { return Integer.parseInt(metadata.get("incorrect pairing count"));} + + public Double getPairingErrorRate() { return Double.parseDouble(metadata.get("pairing error rate"));} + + public String getSimulationTime() { return metadata.get("simulation time (seconds)"); } }