From f6e58e462ed7aa08e69a5e9f0aa2209a73b4147f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <stu114708@informatik.uni-kiel.de>
Date: Mon, 18 Jan 2016 17:25:15 +0100
Subject: [PATCH] Extract OperationsDependencyRelation to own class

---
 .../analysis/dev/OperationsDependency.java    | 48 -----------------
 .../dev/OperationsDependencyRelation.java     | 53 +++++++++++++++++++
 2 files changed, 53 insertions(+), 48 deletions(-)
 create mode 100644 src/main/java/kieker/analysis/dev/OperationsDependencyRelation.java

diff --git a/src/main/java/kieker/analysis/dev/OperationsDependency.java b/src/main/java/kieker/analysis/dev/OperationsDependency.java
index f24c70f9..d2aab114 100644
--- a/src/main/java/kieker/analysis/dev/OperationsDependency.java
+++ b/src/main/java/kieker/analysis/dev/OperationsDependency.java
@@ -97,52 +97,4 @@ public class OperationsDependency {
 	 * }
 	 */
 
-	/**
-	 * Relation between two {@link AggregatedOperationCall}. If this class will be
-	 * extended by more attributes, new hashCode() and equals() methods are required.
-	 *
-	 * @author Sören Henning
-	 *
-	 */
-	// TODO Move to public class
-	private class OperationsDependencyRelation {
-
-		private final AggregatedOperationCall caller;
-
-		private final AggregatedOperationCall callee;
-
-		private int calls;
-
-		private int failuredCalls;
-
-		public OperationsDependencyRelation(final AggregatedOperationCall caller, final AggregatedOperationCall callee) {
-			this.caller = caller;
-			this.callee = callee;
-		}
-
-		public AggregatedOperationCall getCaller() {
-			return caller;
-		}
-
-		public AggregatedOperationCall getCallee() {
-			return callee;
-		}
-
-		public void addCall() {
-			calls++;
-		}
-
-		public void addFailuredCall() {
-			failuredCalls++;
-			addCall();
-		}
-
-		public int getCalls() {
-			return calls;
-		}
-
-		public int getFailuredCalls() {
-			return failuredCalls;
-		}
-	}
 }
diff --git a/src/main/java/kieker/analysis/dev/OperationsDependencyRelation.java b/src/main/java/kieker/analysis/dev/OperationsDependencyRelation.java
new file mode 100644
index 00000000..5556a23d
--- /dev/null
+++ b/src/main/java/kieker/analysis/dev/OperationsDependencyRelation.java
@@ -0,0 +1,53 @@
+package kieker.analysis.dev;
+
+import kieker.analysis.traceanalysisdomain.AggregatedOperationCall;
+
+/**
+ * Relation between two {@link AggregatedOperationCall}. Further it stores
+ * the number one operation calls the other and how many of this call failed
+ * by throwing an exception.
+ *
+ * @author Sören Henning
+ *
+ */
+// TODO Move to domain package
+public class OperationsDependencyRelation {
+
+	private final AggregatedOperationCall caller;
+
+	private final AggregatedOperationCall callee;
+
+	private int calls;
+
+	private int failuredCalls;
+
+	public OperationsDependencyRelation(final AggregatedOperationCall caller, final AggregatedOperationCall callee) {
+		this.caller = caller;
+		this.callee = callee;
+	}
+
+	public AggregatedOperationCall getCaller() {
+		return caller;
+	}
+
+	public AggregatedOperationCall getCallee() {
+		return callee;
+	}
+
+	public void addCall() {
+		calls++;
+	}
+
+	public void addFailuredCall() {
+		failuredCalls++;
+		addCall();
+	}
+
+	public int getCalls() {
+		return calls;
+	}
+
+	public int getFailuredCalls() {
+		return failuredCalls;
+	}
+}
-- 
GitLab