1 package org.simantics.scenegraph.g2d.nodes;
4 * @author Antti Villberg
7 public class TargetedSVGNodeAssignment extends SVGNodeAssignment {
8 public Object singleElementKey;
9 public TargetedSVGNodeAssignment(Object singleElementKey, String elementId, String attributeNameOrId, String value) {
10 super(elementId, attributeNameOrId, value);
11 this.singleElementKey = singleElementKey;
14 public int hashCode() {
17 result = prime * result + ((singleElementKey == null) ? 0 : singleElementKey.hashCode());
18 result = prime * result + ((attributeNameOrId == null) ? 0 : attributeNameOrId.hashCode());
19 result = prime * result + ((elementId == null) ? 0 : elementId.hashCode());
20 result = prime * result + ((value == null) ? 0 : value.hashCode());
24 public boolean equals(Object obj) {
29 if (getClass() != obj.getClass())
31 TargetedSVGNodeAssignment other = (TargetedSVGNodeAssignment) obj;
32 if (singleElementKey == null) {
33 if (other.singleElementKey != null)
35 } else if (!singleElementKey.equals(other.singleElementKey))
37 if (attributeNameOrId == null) {
38 if (other.attributeNameOrId != null)
40 } else if (!attributeNameOrId.equals(other.attributeNameOrId))
42 if (elementId == null) {
43 if (other.elementId != null)
45 } else if (!elementId.equals(other.elementId))
48 if (other.value != null)
50 } else if (!value.equals(other.value))