Class LabeledIdentifier

  • All Implemented Interfaces:
    IDescribable

    public class LabeledIdentifier
    extends java.lang.Object
    implements IDescribable
    An identifier with a name and a description. The identifier value is composed of a string and a long value, but the actual values of these should normally not be that interesting. The important part is that it can be compared using equals(Object).
    • Field Detail

      • interfaceId

        private final java.lang.String interfaceId
      • implId

        private final long implId
      • name

        private final java.lang.String name
      • description

        private final java.lang.String description
    • Constructor Detail

      • LabeledIdentifier

        public LabeledIdentifier​(java.lang.String interfaceId,
                                 long implId,
                                 java.lang.String name,
                                 java.lang.String description)
        Create a new instance.
        Parameters:
        interfaceId - interface part of the identifier value
        implId - implementation part of the identifier value
        name - identifier name
        description - identifier description
    • Method Detail

      • getInterfaceId

        public java.lang.String getInterfaceId()
        Returns:
        interface part of the identifier value
      • getImplementationId

        public long getImplementationId()
        Returns:
        implementation part of the identifier value
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface IDescribable
        Returns:
        the name of this object
      • getDeclaredDescription

        public java.lang.String getDeclaredDescription()
        The getDescription() method gives a generated description. Use this method to get the description passed into the constructor.
        Returns:
        identifier description
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface IDescribable
        Returns:
        the description of this object
      • hashCode

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object