Package org.apache.pivot.beans
Class NamespaceBinding
- java.lang.Object
-
- org.apache.pivot.beans.NamespaceBinding
-
public class NamespaceBinding extends java.lang.ObjectRepresents a binding relationship between a source property and a target property within a namespace.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNamespaceBinding.BindMappingNamespace bind mapping interface.
-
Constructor Summary
Constructors Constructor Description NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath)NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath, NamespaceBinding.BindMapping bindMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind()Binds the source property to the target property.booleanequals(java.lang.Object o)NamespaceBinding.BindMappinggetBindMapping()Returns the bind mapping.Map<java.lang.String,java.lang.Object>getNamespace()java.lang.ObjectgetSource()java.lang.StringgetSourceKey()java.lang.StringgetSourcePath()java.lang.ObjectgetTarget()java.lang.StringgetTargetKey()java.lang.StringgetTargetPath()java.lang.ObjectgetTransformedSourceValue()Returns the current source value with any bind mapping applied.inthashCode()voidunbind()Unbinds the source property from the target property.
-
-
-
Constructor Detail
-
NamespaceBinding
public NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath)
-
NamespaceBinding
public NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath, NamespaceBinding.BindMapping bindMapping)
-
-
Method Detail
-
getNamespace
public Map<java.lang.String,java.lang.Object> getNamespace()
- Returns:
- The namespace.
-
getSourcePath
public java.lang.String getSourcePath()
- Returns:
- The path to the source property.
-
getSource
public java.lang.Object getSource()
- Returns:
- The source object.
-
getSourceKey
public java.lang.String getSourceKey()
- Returns:
- The name of the source property.
-
getTargetPath
public java.lang.String getTargetPath()
- Returns:
- The path to the target property.
-
getTarget
public java.lang.Object getTarget()
- Returns:
- The target object.
-
getTargetKey
public java.lang.String getTargetKey()
- Returns:
- The name of the target property.
-
getBindMapping
public NamespaceBinding.BindMapping getBindMapping()
Returns the bind mapping.- Returns:
- The bind mapping to use during binding, or
nullif no bind mapping is specified.
-
getTransformedSourceValue
public java.lang.Object getTransformedSourceValue()
Returns the current source value with any bind mapping applied.- Returns:
- The source value transformed by the bind mapping (if any), or if none, the source value itself.
-
bind
public void bind()
Binds the source property to the target property. That is, add the already set listeners to the source object's listener lists.
-
unbind
public void unbind()
Unbinds the source property from the target property. That is, remove the listeners from the source object's listener lists.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-