Package io.temporal.common
Class SearchAttributes
- java.lang.Object
-
- io.temporal.common.SearchAttributes
-
public final class SearchAttributes extends java.lang.ObjectImmutable collection of typed search attributes. UseSearchAttributes.Builderto create this collection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSearchAttributes.BuilderBuilder for creating a search attribute collection.
-
Field Summary
Fields Modifier and Type Field Description static SearchAttributesEMPTYAn empty search attribute collection.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(SearchAttributeKey<?> key)Get whether the search attribute key exists.booleanequals(java.lang.Object o)<T> Tget(SearchAttributeKey<T> key)Get a search attribute value by its key or null if not present.java.util.SortedMap<SearchAttributeKey<?>,java.lang.Object>getUntypedValues()Get the immutable, untyped sorted map.inthashCode()static SearchAttributes.BuildernewBuilder()Create a new builder to create a search attribute collection.static SearchAttributes.BuildernewBuilder(SearchAttributes copyFrom)Create a new builder to create a search attribute collection, copying from an existing collection.intsize()Get the size of the collection.
-
-
-
Field Detail
-
EMPTY
public static final SearchAttributes EMPTY
An empty search attribute collection.
-
-
Method Detail
-
newBuilder
public static SearchAttributes.Builder newBuilder()
Create a new builder to create a search attribute collection.
-
newBuilder
public static SearchAttributes.Builder newBuilder(SearchAttributes copyFrom)
Create a new builder to create a search attribute collection, copying from an existing collection.
-
get
public <T> T get(SearchAttributeKey<T> key)
Get a search attribute value by its key or null if not present.- Throws:
java.lang.ClassCastException- If the search attribute is not of the proper type for the key.
-
containsKey
public boolean containsKey(SearchAttributeKey<?> key)
Get whether the search attribute key exists.
-
size
public int size()
Get the size of the collection.
-
getUntypedValues
public java.util.SortedMap<SearchAttributeKey<?>,java.lang.Object> getUntypedValues()
Get the immutable, untyped sorted map.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-