Class ImmutableIntArray.Builder

    • Method Detail

      • addAll

        public <> values)
        Appends values, in order, to the end of the values the built ImmutableIntArray will contain.
      • addAll

        public <> values)
        Appends values, in order, to the end of the values the built ImmutableIntArray will contain.
      • addAll

        public  stream)
        Appends all values from stream, in order, to the end of the values the built ImmutableIntArray will contain.
      • build

        public ImmutableIntArray build()
        Returns a new immutable array. The builder can continue to be used after this call, to append more values and build again.

        Performance note: the returned array is backed by the same array as the builder, so no data is copied as part of this step, but this may occupy more memory than strictly necessary. To copy the data to a right-sized backing array, use .build().trimmed().