Class LabeledIdentifier

java.lang.Object
org.openjdk.jmc.common.util.LabeledIdentifier
All Implemented Interfaces:
IDescribable

public class LabeledIdentifier extends 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).
  • Constructor Details

    • LabeledIdentifier

      public LabeledIdentifier(String interfaceId, long implId, String name, 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 Details

    • getInterfaceId

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

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

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

      public 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 String getDescription()
      Specified by:
      getDescription in interface IDescribable
      Returns:
      the description of this object
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object