Package io.opencensus.implcore.tags
Class TagMapImpl
- java.lang.Object
-
- io.opencensus.tags.TagContext
-
- io.opencensus.implcore.tags.TagMapImpl
-
@Immutable public final class TagMapImpl extends TagContext
Implementation ofTagContext.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classTagMapImpl.TagIterator
-
Field Summary
Fields Modifier and Type Field Description static TagMapImplEMPTYEmptyTagMapImplwith no tags.private java.util.Map<TagKey,TagValueWithMetadata>tags
-
Constructor Summary
Constructors Constructor Description TagMapImpl(java.util.Map<? extends TagKey,? extends TagValueWithMetadata> tags)Creates a newTagMapImplwith the given tags.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Returns true iff the other object is an instance ofTagContextand contains the same key-value pairs.protected java.util.Iterator<Tag>getIterator()Returns an iterator over the tags in thisTagContext.java.util.Map<TagKey,TagValueWithMetadata>getTags()Returns the tags of thisTagMapImpl.-
Methods inherited from class io.opencensus.tags.TagContext
hashCode, toString
-
-
-
-
Field Detail
-
EMPTY
public static final TagMapImpl EMPTY
EmptyTagMapImplwith no tags.
-
tags
private final java.util.Map<TagKey,TagValueWithMetadata> tags
-
-
Constructor Detail
-
TagMapImpl
public TagMapImpl(java.util.Map<? extends TagKey,? extends TagValueWithMetadata> tags)
Creates a newTagMapImplwith the given tags.- Parameters:
tags- the initial tags for thisTagMapImpl.
-
-
Method Detail
-
getTags
public java.util.Map<TagKey,TagValueWithMetadata> getTags()
Returns the tags of thisTagMapImpl.- Returns:
- the tags.
-
getIterator
protected java.util.Iterator<Tag> getIterator()
Description copied from class:TagContextReturns an iterator over the tags in thisTagContext.- Specified by:
getIteratorin classTagContext- Returns:
- an iterator over the tags in this
TagContext.
-
equals
public boolean equals(@Nullable java.lang.Object other)Description copied from class:TagContextReturns true iff the other object is an instance ofTagContextand contains the same key-value pairs. Implementations are free to override this method to provide better performance.- Overrides:
equalsin classTagContext
-
-