org.simantics.databoard.accessor.reference
Class NameReference

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

public class NameReference
extends ChildReference

Reference by name to a record field. Format: "n-"

Author:
Toni Kalajainen

Field Summary
 java.lang.String name
           
 
Fields inherited from class org.simantics.databoard.accessor.reference.ChildReference
childReference, INDEX_PATTERN, MAP_PATTERN, NAME_PATTERN
 
Constructor Summary
NameReference(java.lang.String name)
           
NameReference(java.lang.String name, ChildReference child)
           
 
Method Summary
 ChildReference clone()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
           
 int hashCode()
           
 java.lang.String toString(boolean labelReference)
          Convert the reference into string representation.
 
Methods inherited from class org.simantics.databoard.accessor.reference.ChildReference
compile, concatenate, getChildReference, hasChildReference, parseBinary, parsePath, setChildReference, tail, toPath, toPath, toString, toTypeReference
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Constructor Detail

NameReference

public NameReference(java.lang.String name)

NameReference

public NameReference(java.lang.String name,
                     ChildReference child)
Method Detail

getName

public java.lang.String getName()

toString

public java.lang.String toString(boolean labelReference)
Description copied from class: ChildReference
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 ChildReference
Parameters:
labelReference - if true returns
Returns:
string representation

clone

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

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