1 package org.simantics.scenegraph.g2d.nodes;
4 * @author Antti Villberg
7 public class SVGNodeAssignment {
8 public String elementId;
9 public String attributeNameOrId;
11 public SVGNodeAssignment(String elementId, String attributeNameOrId, String value) {
12 this.elementId = elementId;
13 this.attributeNameOrId = attributeNameOrId;
17 public int hashCode() {
20 result = prime * result + ((attributeNameOrId == null) ? 0 : attributeNameOrId.hashCode());
21 result = prime * result + ((elementId == null) ? 0 : elementId.hashCode());
22 result = prime * result + ((value == null) ? 0 : value.hashCode());
26 public boolean equals(Object obj) {
31 if (getClass() != obj.getClass())
33 SVGNodeAssignment other = (SVGNodeAssignment) obj;
34 if (attributeNameOrId == null) {
35 if (other.attributeNameOrId != null)
37 } else if (!attributeNameOrId.equals(other.attributeNameOrId))
39 if (elementId == null) {
40 if (other.elementId != null)
42 } else if (!elementId.equals(other.elementId))
45 if (other.value != null)
47 } else if (!value.equals(other.value))
52 public String toString() {
53 return "SVGNodeAssignment eid=" + elementId + " attributeNameOrId=" + attributeNameOrId + " value=" + value;