Class SearchAttributes


  • public final class SearchAttributes
    extends java.lang.Object
    Immutable collection of typed search attributes. Use SearchAttributes.Builder to create this 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.
      • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object