com.netflix.servo.tag
Class BasicTag

java.lang.Object
  extended by com.netflix.servo.tag.BasicTag
All Implemented Interfaces:
Tag

public final class BasicTag
extends java.lang.Object
implements Tag

Immutable tag.


Constructor Summary
BasicTag(java.lang.String key, java.lang.String value)
          Creates a new instance with the specified key and value.
 
Method Summary
 boolean equals(java.lang.Object o)
          
 java.lang.String getKey()
          Returns the key corresponding to this tag.
 java.lang.String getValue()
          Returns the value corresponding to this tag.
 int hashCode()
          
static BasicTag parseTag(java.lang.String tagString)
          Deprecated. Use Tags.parseTag instead.
 java.lang.String tagString()
          Returns the string representation of this tag.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicTag

public BasicTag(java.lang.String key,
                java.lang.String value)
Creates a new instance with the specified key and value.

Method Detail

getKey

public java.lang.String getKey()
Returns the key corresponding to this tag.

Specified by:
getKey in interface Tag

getValue

public java.lang.String getValue()
Returns the value corresponding to this tag.

Specified by:
getValue in interface Tag

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

parseTag

public static BasicTag parseTag(java.lang.String tagString)
Deprecated. Use Tags.parseTag instead.

Parse a string representing a tag. A tag string should have the format key=value. Whitespace at the ends of the key and value will be removed. Both the key and value must have at least one character.

Parameters:
tagString - string with encoded tag
Returns:
tag parsed from the string

tagString

public java.lang.String tagString()
Returns the string representation of this tag.

Specified by:
tagString in interface Tag