org.simantics.databoard.util
Class SingleBinding

java.lang.Object
  extended by org.simantics.databoard.util.SingleBinding
All Implemented Interfaces:
BindingScheme

public class SingleBinding
extends java.lang.Object
implements BindingScheme

Binding constructor for a single data type.

Author:
Toni Kalajainen

Constructor Summary
SingleBinding(Binding binding)
           
 
Method Summary
 Binding getBinding(DataType type2)
          Get binding of a data type
 boolean supportsType(DataType type)
          Tests if the scheme supports a type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleBinding

public SingleBinding(Binding binding)
Method Detail

getBinding

public Binding getBinding(DataType type2)
                   throws BindingConstructionException
Description copied from interface: BindingScheme
Get binding of a data type

Specified by:
getBinding in interface BindingScheme
Parameters:
type2 - data type
Returns:
binding
Throws:
BindingConstructionException - if data type is not supported

supportsType

public boolean supportsType(DataType type)
Description copied from interface: BindingScheme
Tests if the scheme supports a type

Specified by:
supportsType in interface BindingScheme
Returns:
true if the type is with in the scheme