Class MemberNameImpl

  • All Implemented Interfaces:
    Serializable, Comparable<GenericName>, GenericName, LocalName, MemberName

    public class MemberNameImpl
    extends LocalName
    implements MemberName
    The name to identify a member of a record. This is typically used as of a Map<MemberName,TypeName>.

    It may be more simple to think of MemberName as a Map.Entry - since it is both the "key" and the "value".

    This presents a bit of a conflict in that we are never quite sure what comes first the record or the member during creation time.
    Since:
    2.4
    Author:
    Jody Garnett, Martin Desruisseaux
    See Also:
    Serialized Form
    • Constructor Detail

      • MemberNameImpl

        public MemberNameImpl​(CharSequence name,
                              TypeName typeName)
        Constructs a member name from the specified string with no scope.
        Parameters:
        name - The local name (never null).
        typeName - The type associated with this name.
    • Method Detail

      • getAttributeType

        public TypeName getAttributeType()
        Returns the type of the data associated with the record member.
        Specified by:
        getAttributeType in interface MemberName
      • equals

        public boolean equals​(Object object)
        Compares this member name with the associated object for equality.
        Overrides:
        equals in class LocalName
        Parameters:
        object - The object to compare with this name.
        Returns:
        true if the given object is equals to this one.
      • hashCode

        public int hashCode()
        Description copied from class: LocalName
        Returns a hash code value for this local name.
        Overrides:
        hashCode in class LocalName