1 /*******************************************************************************
2 * Copyright (c) 2007, 2012 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.example;
14 import org.simantics.databoard.Bindings;
15 import org.simantics.databoard.binding.Binding;
16 import org.simantics.databoard.binding.util.DefaultValue;
17 import org.simantics.databoard.type.DoubleType;
18 import org.simantics.databoard.type.RecordType;
19 import org.simantics.databoard.util.Limit;
20 import org.simantics.databoard.util.Range;
24 public static void main(String[] args) {
26 DoubleType t1 = new DoubleType();
27 DoubleType t2 = new DoubleType();
30 System.out.println( t1.hashCode() );
31 System.out.println( t2.hashCode() );
34 RecordType r1 = new RecordType();
35 RecordType r2 = new RecordType();
36 r1.addComponent("x", t1);
37 r2.addComponent("x", t2);
39 System.out.println( r1.hashCode() );
40 System.out.println( r2.hashCode() );
42 t1.setRange( new Range(Limit.nolimit(), Limit.nolimit()) );
43 Binding b = Bindings.getBinding(t1);
44 DefaultValue dv = new DefaultValue();
45 System.out.println( b.accept( dv ) );