Interface AttributeMap<TYPE extends AttributeMap<TYPE>>

All Known Subinterfaces:
GridAttributes<TYPE>, HierarchicalTable<IFACE_TYPE>, LazySnapshotTable, RollupTable, Table, TableAdapter, TableDefaults, TreeTable
All Known Implementing Classes:
AppendOnlyArrayBackedInputTable, BarrageBlinkTable, BarrageRedirectedTable, BarrageTable, BaseGridAttributes, BaseTable, DeferredViewTable, InitialSnapshotTable, InMemoryTable, KeyedArrayBackedInputTable, LiveAttributeMap, PartitionAwareSourceTable, QueryReplayGroupedTable, QueryTable, QueryTable.FilteredTable, RedefinableTable, ReplayGroupedFullTable, ReplayLastByGroupedTable, ReplayTable, ReplayTableBase, RollupTableImpl, SimpleSourceTable, SourceTable, TimeTable, TreeTableImpl, UncoalescedTable, UpdatableTable, UpdateSourceQueryTable

public interface AttributeMap<TYPE extends AttributeMap<TYPE>>
Interface for objects (mostly tables and similar) that act as an immutable map of key-value attribute pairs.
  • Method Details

    • withAttributes

      @ConcurrentMethod TYPE withAttributes(@NotNull @NotNull Map<String,Object> toAdd, @NotNull @NotNull Collection<String> toRemove)
      Get an AttributeMap that is the same as this, but with the specified attributes added/replaced or removed. If the supplied attributes toAdd and toRemove would not result in any changes to this, implementations may return this.
      Parameters:
      toAdd - Attribute key-value pairs to add or replace (if the key already exists on this). Neither keys nor values may be null.
      toRemove - Attribute keys to remove
      Returns:
      The result AttributeMap
      ApiNote:
      If this is a Table, the result will be a child Table that is identical but for its attributes, and if ((Table)this).isRefreshing(), the result will deliver identical updates to this on each cycle., If the result is a LivenessReferent, it will always be appropriately managed by the enclosing liveness scope.
    • withAttributes

      @ConcurrentMethod TYPE withAttributes(@NotNull @NotNull Map<String,Object> toAdd)
      Get an AttributeMap that is the same as this, but with the specified attributes added/replaced. If the supplied attributes toAdd would not result in any changes to this, implementations may return this.
      Parameters:
      toAdd - Attribute key-value pairs to add or replace (if the key already exists on this)
      Returns:
      The result AttributeMap
      ApiNote:
      If this is a Table, the result will be a child Table that is identical but for its attributes, and if ((Table)this).isRefreshing(), the result will deliver identical updates to this on each cycle., If the result is a LivenessReferent, it will always be appropriately managed by the enclosing liveness scope.
    • withoutAttributes

      @ConcurrentMethod TYPE withoutAttributes(@NotNull @NotNull Collection<String> toRemove)
      Get an AttributeMap that is the same as this, but with the specified attributes removed. If the supplied attributes toRemove would not result in any changes to this, implementations may return this.
      Parameters:
      toRemove - Attribute keys to remove
      Returns:
      The result AttributeMap
      ApiNote:
      If this is a Table, the result will be a child Table that is identical but for its attributes, and if ((Table)this).isRefreshing(), the result will deliver identical updates to this on each cycle., If the result is a LivenessReferent, it will always be appropriately managed by the enclosing liveness scope.
    • retainingAttributes

      @ConcurrentMethod TYPE retainingAttributes(@NotNull @NotNull Collection<String> toRetain)
      Get an AttributeMap that is the same as this, but with only the specified attributes retained. If the supplied attributes toAdd would not result in any changes to this, implementations may return this.
      Parameters:
      toRetain - Attribute keys to retain
      Returns:
      The result AttributeMap
      ApiNote:
      If this is a Table, the result will be a child Table that is identical but for its attributes, and if ((Table)this).isRefreshing(), the result will deliver identical updates to this on each cycle., If the result is a LivenessReferent, it will always be appropriately managed by the enclosing liveness scope.
    • getAttribute

      @ConcurrentMethod @Nullable @Nullable Object getAttribute(@NotNull @NotNull String key)
      Get the value for the specified attribute key.
      Parameters:
      key - The name of the attribute
      Returns:
      The value, or null if there was none.
    • getAttributeKeys

      @ConcurrentMethod @NotNull @NotNull Set<String> getAttributeKeys()
      Get an immutable set of all the attributes that have values in this AttributeMap.
      Returns:
      An immutable set of attribute keys (names)
    • hasAttribute

      @ConcurrentMethod boolean hasAttribute(@NotNull @NotNull String key)
      Check if the specified attribute exists in this AttributeMap.
      Parameters:
      key - The key (name) of the attribute
      Returns:
      true if the attribute exists
    • getAttributes

      @ConcurrentMethod @NotNull @NotNull Map<String,Object> getAttributes()
      Get all attributes in this AttributeMap.
      Returns:
      An immutable map containing all attributes from this AttributeMap
    • getAttributes

      @ConcurrentMethod @NotNull @NotNull Map<String,Object> getAttributes(@NotNull @NotNull Predicate<String> included)
      Get all attributes from this AttributeMap whose keys are accepted by included.
      Parameters:
      included - A predicate to determine which attribute keys to include
      Returns:
      An immutable map containing AttributeMap's attributes whose keys are accepted by included