1 /*******************************************************************************
2 * Copyright (c) 2017 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.scenegraph.g2d.nodes;
14 import java.awt.geom.AffineTransform;
17 * @author Antti Villberg
20 public class TransformationAssignment {
22 public AffineTransform transform;
23 public TransformationAssignment(Object key, AffineTransform transform) {
25 this.transform = transform;
28 public int hashCode() {
31 result = prime * result + ((key == null) ? 0 : key.hashCode());
32 result = prime * result + ((transform == null) ? 0 : transform.hashCode());
36 public boolean equals(Object obj) {
41 if (getClass() != obj.getClass())
43 TransformationAssignment other = (TransformationAssignment) obj;
45 if (other.key != null)
47 } else if (!key.equals(other.key))
49 if (transform == null) {
50 if (other.transform != null)
52 } else if (!transform.equals(other.transform))