Package org.openjdk.jmc.common.util
Class LabeledIdentifier
- java.lang.Object
-
- org.openjdk.jmc.common.util.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 usingequals(Object).
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringdescriptionprivate longimplIdprivate java.lang.StringinterfaceIdprivate java.lang.Stringname
-
Constructor Summary
Constructors Constructor Description LabeledIdentifier(java.lang.String interfaceId, long implId, java.lang.String name, java.lang.String description)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetDeclaredDescription()ThegetDescription()method gives a generated description.java.lang.StringgetDescription()longgetImplementationId()java.lang.StringgetInterfaceId()java.lang.StringgetName()inthashCode()java.lang.StringtoString()
-
-
-
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 valueimplId- implementation part of the identifier valuename- identifier namedescription- 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:
getNamein interfaceIDescribable- Returns:
- the name of this object
-
getDeclaredDescription
public java.lang.String getDeclaredDescription()
ThegetDescription()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:
getDescriptionin interfaceIDescribable- Returns:
- the description of this object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-