com.netflix.servo.tag
Class SortedTagList

java.lang.Object
  extended by com.netflix.servo.tag.SortedTagList
All Implemented Interfaces:
TagList, java.lang.Iterable<Tag>

public final class SortedTagList
extends java.lang.Object
implements TagList


Nested Class Summary
static class SortedTagList.Builder
           
 
Field Summary
static SortedTagList EMPTY
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> asMap()
          Returns a map containing a copy of the tags in this list.
static SortedTagList.Builder builder()
           
 boolean containsKey(java.lang.String key)
          Returns true if this list has a tag with the given key.
 boolean equals(java.lang.Object obj)
          
 Tag getTag(java.lang.String key)
          Returns the tag matching a given key or null if not match is found.
 java.lang.String getValue(java.lang.String key)
          Returns the value matching a given key or null if not match is found.
 int hashCode()
          
 boolean isEmpty()
          Returns true if this list is emtpy.
 java.util.Iterator<Tag> iterator()
          
 int size()
          Returns the number of tags in this list.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final SortedTagList EMPTY
Method Detail

getTag

public Tag getTag(java.lang.String key)
Returns the tag matching a given key or null if not match is found.

Specified by:
getTag in interface TagList

getValue

public java.lang.String getValue(java.lang.String key)
Returns the value matching a given key or null if not match is found.

Specified by:
getValue in interface TagList

containsKey

public boolean containsKey(java.lang.String key)
Returns true if this list has a tag with the given key.

Specified by:
containsKey in interface TagList

isEmpty

public boolean isEmpty()
Returns true if this list is emtpy.

Specified by:
isEmpty in interface TagList

size

public int size()
Returns the number of tags in this list.

Specified by:
size in interface TagList

iterator

public java.util.Iterator<Tag> iterator()

Specified by:
iterator in interface TagList
Specified by:
iterator in interface java.lang.Iterable<Tag>

asMap

public java.util.Map<java.lang.String,java.lang.String> asMap()
Returns a map containing a copy of the tags in this list.

Specified by:
asMap in interface TagList

builder

public static SortedTagList.Builder builder()

equals

public boolean equals(java.lang.Object obj)

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