|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.binding.Binding
org.simantics.databoard.binding.VariantBinding
public abstract class VariantBinding
This is the abstract base class for bindings of VariantType Java Objects. Variant is a container that has value of any Datatype.
The Datatype
,
Binds variant to {@link Variant}
,
Binds variant to {@link MutableVariant}
,
Binds variant to java.lang.Object
,
Binds variant to java.lang.String (Filename and URL compatible)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.simantics.databoard.binding.Binding |
---|
Binding.Visitor<T>, Binding.Visitor1 |
Constructor Summary | |
---|---|
VariantBinding()
|
Method Summary | ||
---|---|---|
|
accept(Binding.Visitor<T> v)
|
|
void |
accept(Binding.Visitor1 v,
java.lang.Object obj)
|
|
abstract java.lang.Object |
create(Binding contentBinding,
java.lang.Object content)
Create a new variant object. |
|
java.lang.Object |
createUnchecked(Binding contentBinding,
java.lang.Object content)
Create a new variant object. |
|
int |
deepCompare(java.lang.Object o1,
java.lang.Object o2,
java.util.Set<IdentityPair<java.lang.Object,java.lang.Object>> compareHistory)
|
|
int |
deepHashValue(java.lang.Object value,
java.util.IdentityHashMap<java.lang.Object,java.lang.Object> hashedObjects)
Calculate hash value |
|
abstract java.lang.Object |
getContent(java.lang.Object variant)
Get the value of the variant. |
|
abstract java.lang.Object |
getContent(java.lang.Object variant,
Binding contentBinding)
Get the value in the variant. |
|
abstract Binding |
getContentBinding(java.lang.Object variant)
Return a suggestion for the binding of the content of this variant. |
|
abstract DataType |
getContentType(java.lang.Object variant)
Get the data type of the content. |
|
abstract void |
setContent(java.lang.Object variant,
Binding contentBinding,
java.lang.Object content)
Set the content of an variant. |
Methods inherited from class org.simantics.databoard.binding.Binding |
---|
assertInstaceIsValid, assertInstaceIsValid, clone, cloneUnchecked, compare, createDefault, createDefaultUnchecked, createRandom, createRandomUnchecked, equals, hashValue, isImmutable, isInstance, main, parseValue, parseValue, parseValueDefinition, printValue, printValueDefinition, serializer, serializer, serializerUnchecked, toString, type |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public VariantBinding()
Method Detail |
---|
public abstract java.lang.Object getContent(java.lang.Object variant, Binding contentBinding) throws BindingException
variant
.
variant
- the variant object to read the content fromcontentBinding
- the format of return value
BindingException
public abstract java.lang.Object getContent(java.lang.Object variant) throws BindingException
getContentBinding(Object)
.
variant
- the variant object
BindingException
public abstract DataType getContentType(java.lang.Object variant) throws BindingException
variant
- the variant object
BindingException
public abstract Binding getContentBinding(java.lang.Object variant) throws BindingException
variant
- variant object
BindingException
public abstract java.lang.Object create(Binding contentBinding, java.lang.Object content) throws BindingException
value
argument may be included in the result.
contentBinding
- the binding of the contentcontent
- content
BindingException
public java.lang.Object createUnchecked(Binding contentBinding, java.lang.Object content) throws RuntimeBindingException
contentBinding
- binding of the contentcontent
- content
RuntimeBindingException
public abstract void setContent(java.lang.Object variant, Binding contentBinding, java.lang.Object content) throws BindingException
variant
- variant objectcontentBinding
- content's bindingcontent
- new content
BindingException
public void accept(Binding.Visitor1 v, java.lang.Object obj)
accept
in class Binding
public <T> T accept(Binding.Visitor<T> v)
accept
in class Binding
public int deepHashValue(java.lang.Object value, java.util.IdentityHashMap<java.lang.Object,java.lang.Object> hashedObjects) throws BindingException
Binding
deepHashValue
in class Binding
hashedObjects
- collection of already hashed object or optionally null
BindingException
public int deepCompare(java.lang.Object o1, java.lang.Object o2, java.util.Set<IdentityPair<java.lang.Object,java.lang.Object>> compareHistory) throws BindingException
deepCompare
in class Binding
BindingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |