Interface Internal.DoubleList

All Superinterfaces:
Collection<Double>, Internal.ProtobufList<Double>, Iterable<Double>, List<Double>, RandomAccess, SequencedCollection<Double>
Enclosing class:
Internal

public static interface Internal.DoubleList extends Internal.ProtobufList<Double>
A List implementation that avoids boxing the elements into Doubles if possible. Does not support null elements.
  • Method Details

    • getDouble

      double getDouble(int index)
      Like List.get(int) but more efficient in that it doesn't box the returned value.
    • addDouble

      void addDouble(double element)
      Like List.add(Object) but more efficient in that it doesn't box the element.
    • setDouble

      @CanIgnoreReturnValue double setDouble(int index, double element)
      Like List.set(int, Object) but more efficient in that it doesn't box the element.
    • mutableCopyWithCapacity

      Internal.DoubleList mutableCopyWithCapacity(int capacity)
      Returns a mutable clone of this list with the specified capacity.
      Specified by:
      mutableCopyWithCapacity in interface Internal.ProtobufList<Double>