1 /*******************************************************************************
\r
2 * Copyright (c) 2010 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.databoard.type;
15 public class DataTypeDefinition {
20 public DataTypeDefinition(String name, Datatype dataType)
23 this.dataType = dataType;
26 public String getName() {
30 public void setName(String name) {
34 public Datatype getDataType() {
39 public String toString() {
40 return name+" = "+dataType.toString();
44 public int hashCode() {
45 return name.hashCode() + dataType.hashCode()*7;
49 public boolean equals(Object obj) {
50 if (obj instanceof DataTypeDefinition==false) return false;
51 DataTypeDefinition other = (DataTypeDefinition) obj;
52 return other.name.equals(name) && other.dataType.equals(dataType);