Class SearchAttributes

java.lang.Object
io.temporal.common.SearchAttributes

public final class SearchAttributes extends Object
Immutable collection of typed search attributes. Use SearchAttributes.Builder to create this collection.
  • Field Details

    • EMPTY

      public static final SearchAttributes EMPTY
      An empty search attribute collection.
  • Method Details

    • 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:
      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 SortedMap<SearchAttributeKey<?>,Object> getUntypedValues()
      Get the immutable, untyped sorted map.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object