From 0357dd0903ad4f1a3272d74afc25ea38cfacd3f7 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 5 Aug 2014 14:30:52 +0200 Subject: [PATCH] JavaCodeResult equals implementiert --- src/typinferenz/JavaCodeResult.java | 6 +++++- src/typinferenz/typedeployment/TypeInsertPoint.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/typinferenz/JavaCodeResult.java b/src/typinferenz/JavaCodeResult.java index 4fa8ebac5..4ec7160c7 100755 --- a/src/typinferenz/JavaCodeResult.java +++ b/src/typinferenz/JavaCodeResult.java @@ -56,7 +56,11 @@ public class JavaCodeResult{ @Override public boolean equals(Object obj){ - throw new NotImplementedException(); + if(!(obj instanceof JavaCodeResult))return false; + JavaCodeResult equals = (JavaCodeResult)obj; + if(!equals.getJavaCode().equals(this.getJavaCode()))return false; + if(!equals.getUnresolvedTPH().equals(this.getUnresolvedTPH()))return false; + return true; } } diff --git a/src/typinferenz/typedeployment/TypeInsertPoint.java b/src/typinferenz/typedeployment/TypeInsertPoint.java index 4e6c5d753..a00258b11 100644 --- a/src/typinferenz/typedeployment/TypeInsertPoint.java +++ b/src/typinferenz/typedeployment/TypeInsertPoint.java @@ -40,7 +40,7 @@ public class TypeInsertPoint extends SourcePatchPoint { this.resultSet = resultSet; this.node = insertNode; } - + /** * Setzt den Typ dieses TypeInsertPoint in den übergebenen Quelltext ein. * @param fileContent - der Quelltext