Class ImmutableDoubleArray.Builder
java.lang.Object
com.google.common.primitives.ImmutableDoubleArray.Builder
- Enclosing class:
- ImmutableDoubleArray
A builder for 
ImmutableDoubleArray instances; obtained using ImmutableDoubleArray.builder(int).- Since:
- 22.0
- 
Method SummaryModifier and TypeMethodDescriptionadd(double value) Appendsvalueto the end of the values the builtImmutableDoubleArraywill contain.addAll(double[] values) Appendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.addAll(ImmutableDoubleArray values) Appendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.Appendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.addAll(Collection<Double> values) Appendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.addAll(DoubleStream stream) Appends all values fromstream, in order, to the end of the values the builtImmutableDoubleArraywill contain.build()Returns a new immutable array.
- 
Method Details- 
addAppendsvalueto the end of the values the builtImmutableDoubleArraywill contain.
- 
addAllAppendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.
- 
addAllAppendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.
- 
addAllAppendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.
- 
addAllAppends all values fromstream, in order, to the end of the values the builtImmutableDoubleArraywill contain.- Since:
- 33.4.0 (but since 22.0 in the JRE flavor)
 
- 
addAllAppendsvalues, in order, to the end of the values the builtImmutableDoubleArraywill contain.
- 
buildReturns 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().
 
-