org.simantics.databoard.accessor.reference
Class KeyReference

java.lang.Object
  extended by org.simantics.databoard.accessor.reference.AccessorReference
      extended by org.simantics.databoard.accessor.reference.KeyReference
All Implemented Interfaces:
java.lang.Cloneable

public class KeyReference
extends AccessorReference

Map Value "/"


Field Summary
 Variant key
           
 
Fields inherited from class org.simantics.databoard.accessor.reference.AccessorReference
ARRAY_ELEMENT_PATTERN, childReference, FIELD_INDEX_PATTERN, FIELD_NAME_PATTERN, MAP_PATTERN, UNION_INDEX_PATTERN, UNION_NAME_PATTERN
 
Constructor Summary
KeyReference(Binding keyBinding, java.lang.Object key)
           
KeyReference(Variant key)
           
KeyReference(Variant key, AccessorReference child)
           
 
Method Summary
 AccessorReference clone()
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
          Convert the reference into its string representation
 java.lang.String toString(boolean labelReference)
          Convert the reference into string representation.
 
Methods inherited from class org.simantics.databoard.accessor.reference.AccessorReference
compile, concatenate, getChildReference, hasChildReference, parseBinary, parseString, setChildReference, tail, toPath, toPath
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

key

public Variant key
Constructor Detail

KeyReference

public KeyReference(Binding keyBinding,
                    java.lang.Object key)

KeyReference

public KeyReference(Variant key)

KeyReference

public KeyReference(Variant key,
                    AccessorReference child)
Method Detail

toString

public java.lang.String toString(boolean labelReference)
Description copied from class: AccessorReference
Convert the reference into string representation.

If labelReference is true, the string representation is more user readable but has weaker typing. It serializes into instances of LabelReference. For instance Record Field Reference is "n-Children", but label reference "Children". Some references cannot be converted into LabelReference. E.g. string representation of FieldNameReference("i-5") is ambiguous with ArrayIndexReference(5).

Specified by:
toString in class AccessorReference
Parameters:
labelReference - if true returns
Returns:
string representation

clone

public AccessorReference clone()
Specified by:
clone in class AccessorReference

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Description copied from class: AccessorReference
Convert the reference into its string representation

Overrides:
toString in class AccessorReference
Returns:
reference string representation