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.String
description
private long
implId
private java.lang.String
interfaceId
private java.lang.String
name
-
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 boolean
equals(java.lang.Object obj)
java.lang.String
getDeclaredDescription()
ThegetDescription()
method gives a generated description.java.lang.String
getDescription()
long
getImplementationId()
java.lang.String
getInterfaceId()
java.lang.String
getName()
int
hashCode()
java.lang.String
toString()
-
-
-
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:
getName
in 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:
getDescription
in interfaceIDescribable
- Returns:
- the description of this object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-