org.simantics.databoard.binding.factory
Class MutableBindingFactory

java.lang.Object
  extended by org.simantics.databoard.binding.factory.BindingFactory
      extended by org.simantics.databoard.binding.factory.MutableBindingFactory
All Implemented Interfaces:
BindingScheme

public class MutableBindingFactory
extends BindingFactory

MutableBindingScheme is a type to binding mapping that binds any DataType to an Object. All resulting bindings are completely mutable java classes. DataType | Class of the bound instance ===================|================== BooleanType | MutableBoolean.class ByteType | MutableByte.class FloatType | MutableFloat.class DoubleType | MutableDouble.class IntegerType | MutableInt.class LongType | MutableLong.class StringType | MutableString.class UnionType | TaggedObject.class OptionType | ValueContainer.class RecordType | Object[].class ArrayType | ArrayList.class MapType | TreeMap.class VariantType | MutableVariant.class

Author:
Toni Kalajainen

Constructor Summary
MutableBindingFactory()
          Construct a binding factory.
MutableBindingFactory(java.util.Map<Datatype,Binding> repository)
          Construct a scheme factory that appends constructed bindings to the user given repository
 
Method Summary
 boolean supportsType(Datatype type)
          Tests if the scheme supports a type
 
Methods inherited from class org.simantics.databoard.binding.factory.BindingFactory
construct, getBinding, getBindingUnchecked, getRepository
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableBindingFactory

public MutableBindingFactory()
Construct a binding factory.


MutableBindingFactory

public MutableBindingFactory(java.util.Map<Datatype,Binding> repository)
Construct a scheme factory that appends constructed bindings to the user given repository

Parameters:
repository - repository where bindings are placed
Method Detail

supportsType

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

Returns:
true if the type is supported by the scheme