Package org.eclipse.microprofile.metrics
Class Tag
- java.lang.Object
-
- org.eclipse.microprofile.metrics.Tag
-
public class Tag extends java.lang.Object
Tag represents a singular metric tag key and value pair. The Tag contains:-
TagName
: (Required) The name of the tag. Must match the regex [a-zA-Z_][a-zA-Z0-9_]*. -
TagValue
: (Required) The value of the tag.
-
-
-
Constructor Summary
Constructors Constructor Description Tag(java.lang.String tagName, java.lang.String tagValue)
Constructs the Tag object with the given tag name and tag value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getTagName()
java.lang.String
getTagValue()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Tag
public Tag(java.lang.String tagName, java.lang.String tagValue) throws java.lang.IllegalArgumentException
Constructs the Tag object with the given tag name and tag value- Parameters:
tagName
- The tag name, must match the regex [a-zA-Z_][a-zA-Z0-9_]*.tagValue
- The tag value- Throws:
java.lang.IllegalArgumentException
- If the tagName does not match [a-zA-Z_][a-zA-Z0-9_]*
-
-
Method Detail
-
getTagName
public java.lang.String getTagName()
- Returns:
- the tagName
-
getTagValue
public java.lang.String getTagValue()
- Returns:
- the tagValue
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-