Class ImmutableSetRows.Builder

  • Enclosing class:
    ImmutableSetRows

    @NotThreadSafe
    public static final class ImmutableSetRows.Builder
    extends Object
    Builds instances of type ImmutableSetRows. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder from​(SetRows instance)
        Fill a builder with attribute values from the provided SetRows instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • addTriggers

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder addTriggers​(Trigger<ItemState> element)
        Adds one element to triggers list.
        Parameters:
        element - A triggers element
        Returns:
        this builder for use in a chained invocation
      • triggers

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder triggers​(Iterable<? extends Trigger<ItemState>> elements)
        Sets or replaces all elements for triggers list.
        Parameters:
        elements - An iterable of triggers elements
        Returns:
        this builder for use in a chained invocation
      • addAllTriggers

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder addAllTriggers​(Iterable<? extends Trigger<ItemState>> elements)
        Adds elements to triggers list.
        Parameters:
        elements - An iterable of triggers elements
        Returns:
        this builder for use in a chained invocation
      • targetId

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder targetId​(ItemId targetId)
        Initializes the value for the targetId attribute.
        Parameters:
        targetId - The value for targetId
        Returns:
        this builder for use in a chained invocation
      • addIds

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder addIds​(int element)
        Adds one element to ids list.
        Parameters:
        element - A ids element
        Returns:
        this builder for use in a chained invocation
      • addIds

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder addIds​(int... elements)
        Adds elements to ids list.
        Parameters:
        elements - An array of ids elements
        Returns:
        this builder for use in a chained invocation
      • ids

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder ids​(Iterable<Integer> elements)
        Sets or replaces all elements for ids list.
        Parameters:
        elements - An iterable of ids elements
        Returns:
        this builder for use in a chained invocation
      • addAllIds

        @CanIgnoreReturnValue
        public final ImmutableSetRows.Builder addAllIds​(Iterable<Integer> elements)
        Adds elements to ids list.
        Parameters:
        elements - An iterable of ids elements
        Returns:
        this builder for use in a chained invocation