summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-widget
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-widget')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java40
1 files changed, 30 insertions, 10 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java b/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
index 7bdecc2c3a..58edfdd3ba 100644
--- a/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
+++ b/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
@@ -80,16 +80,6 @@ public class WidgetImplementationImpl extends ImplementationImpl implements Widg
return TYPE;
}
- @Override
- public String getURI() {
- return location;
- }
-
- @Override
- public void setURI(String uri) {
- this.location = uri;
- }
-
public String getLocation() {
return location;
}
@@ -111,4 +101,34 @@ public class WidgetImplementationImpl extends ImplementationImpl implements Widg
public String toString() {
return "Widget : " + getLocation();
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((location == null) ? 0 : location.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (!(obj instanceof WidgetImplementationImpl)) {
+ return false;
+ }
+ WidgetImplementationImpl other = (WidgetImplementationImpl)obj;
+ if (location == null) {
+ if (other.location != null) {
+ return false;
+ }
+ } else if (!location.equals(other.location)) {
+ return false;
+ }
+ return true;
+ }
}