1 /*******************************************************************************
2 * Copyright (c) 2010 Association for Decentralized Information Management in
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 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.databoard.method;
14 public class InterfaceDefinition {
19 private transient int hash;
21 public InterfaceDefinition(String name, Interface type)
25 hash = name.hashCode() + type.hashCode()*7;
28 public String getName() {
32 public void setName(String name) {
34 hash = name.hashCode() + type.hashCode()*7;
37 public Interface getType() {
42 public String toString() {
43 return name+" = "+type;
47 public int hashCode() {
52 public boolean equals(Object obj) {
53 if (obj instanceof InterfaceDefinition==false) return false;
54 InterfaceDefinition other = (InterfaceDefinition) obj;
55 return other.name.equals(name) && other.type.equals(type);