Class FloatList

java.lang.Object
com.landawn.abacus.util.PrimitiveList<Float,float[],FloatList>
com.landawn.abacus.util.FloatList
All Implemented Interfaces:
Serializable, RandomAccess

public final class FloatList extends PrimitiveList<Float,float[],FloatList>
Since:
0.8
Author:
Haiyang Li
See Also:
  • Constructor Details

    • FloatList

      public FloatList()
    • FloatList

      public FloatList(int initialCapacity)
      Parameters:
      initialCapacity -
    • FloatList

      public FloatList(float[] a)
      The specified array is used as the element array for this list without copying action.
      Parameters:
      a -
    • FloatList

      public FloatList(float[] a, int size)
      Parameters:
      a -
      size -
  • Method Details

    • of

      @SafeVarargs public static FloatList of(float... a)
      Parameters:
      a -
      Returns:
    • of

      public static FloatList of(float[] a, int size)
      Parameters:
      a -
      size -
      Returns:
    • copyOf

      public static FloatList copyOf(float[] a)
      Parameters:
      a -
      Returns:
    • copyOf

      public static FloatList copyOf(float[] a, int fromIndex, int toIndex)
      Parameters:
      a -
      fromIndex -
      toIndex -
      Returns:
    • from

      public static FloatList from(Collection<Float> c)
      Parameters:
      c -
      Returns:
    • from

      public static FloatList from(Collection<Float> c, float defaultForNull)
      Parameters:
      c -
      defaultForNull -
      Returns:
    • from

      public static FloatList from(Collection<Float> c, int fromIndex, int toIndex)
      Parameters:
      c -
      fromIndex -
      toIndex -
      Returns:
    • from

      public static FloatList from(Collection<Float> c, int fromIndex, int toIndex, float defaultForNull)
      Parameters:
      c -
      fromIndex -
      toIndex -
      defaultForNull -
      Returns:
    • repeat

      public static FloatList repeat(float element, int len)
      Parameters:
      element -
      len -
      Returns:
    • random

      public static FloatList random(int len)
      Parameters:
      len -
      Returns:
    • array

      @Beta public float[] array()
      Returns the original element array without copying.
      Specified by:
      array in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • get

      public float get(int index)
      Parameters:
      index -
      Returns:
    • set

      public float set(int index, float e)
      Parameters:
      index -
      e -
      Returns:
    • add

      public void add(float e)
      Parameters:
      e -
    • add

      public void add(int index, float e)
      Parameters:
      index -
      e -
    • addAll

      public boolean addAll(FloatList c)
      Adds the all.
      Specified by:
      addAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      c -
      Returns:
    • addAll

      public boolean addAll(int index, FloatList c)
      Adds the all.
      Specified by:
      addAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      index -
      c -
      Returns:
    • addAll

      public boolean addAll(float[] a)
      Adds the all.
      Specified by:
      addAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • addAll

      public boolean addAll(int index, float[] a)
      Adds the all.
      Specified by:
      addAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      index -
      a -
      Returns:
    • remove

      public boolean remove(float e)
      Parameters:
      e -
      Returns:
      true if this list contained the specified element
    • removeAllOccurrences

      public boolean removeAllOccurrences(float e)
      Removes the all occurrences.
      Parameters:
      e -
      Returns:
      true if this list contained the specified element
    • removeAll

      public boolean removeAll(FloatList c)
      Removes the all.
      Specified by:
      removeAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      c -
      Returns:
    • removeAll

      public boolean removeAll(float[] a)
      Removes the all.
      Specified by:
      removeAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • removeIf

      public <E extends Exception> boolean removeIf(Throwables.FloatPredicate<E> p) throws E
      Removes the if.
      Type Parameters:
      E -
      Parameters:
      p -
      Returns:
      Throws:
      E - the e
    • removeDuplicates

      public boolean removeDuplicates()
      Specified by:
      removeDuplicates in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • retainAll

      public boolean retainAll(FloatList c)
      Specified by:
      retainAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      c -
      Returns:
    • retainAll

      public boolean retainAll(float[] a)
      Specified by:
      retainAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • delete

      public float delete(int index)
      Parameters:
      index -
      Returns:
    • deleteAllByIndices

      @SafeVarargs public final void deleteAllByIndices(int... indices)
      Specified by:
      deleteAllByIndices in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      indices -
    • deleteRange

      public void deleteRange(int fromIndex, int toIndex)
      Specified by:
      deleteRange in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
    • moveRange

      public void moveRange(int fromIndex, int toIndex, int newPositionStartIndex)
      Specified by:
      moveRange in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      newPositionStartIndex -
    • replaceRange

      public void replaceRange(int fromIndex, int toIndex, float[] replacement)
      Specified by:
      replaceRange in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      replacement -
    • replaceAll

      public int replaceAll(float oldVal, float newVal)
      Parameters:
      oldVal -
      newVal -
      Returns:
    • replaceAll

      public <E extends Exception> void replaceAll(Throwables.FloatUnaryOperator<E> operator) throws E
      Type Parameters:
      E -
      Parameters:
      operator -
      Throws:
      E - the e
    • replaceIf

      public <E extends Exception> boolean replaceIf(Throwables.FloatPredicate<E> predicate, float newValue) throws E
      Type Parameters:
      E -
      Parameters:
      predicate -
      newValue -
      Returns:
      Throws:
      E - the e
    • fill

      public void fill(float val)
      Parameters:
      val -
    • fill

      public void fill(int fromIndex, int toIndex, float val)
      Parameters:
      fromIndex -
      toIndex -
      val -
    • contains

      public boolean contains(float e)
      Parameters:
      e -
      Returns:
    • containsAny

      public boolean containsAny(FloatList c)
      Specified by:
      containsAny in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      c -
      Returns:
    • containsAny

      public boolean containsAny(float[] a)
      Specified by:
      containsAny in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • containsAll

      public boolean containsAll(FloatList c)
      Specified by:
      containsAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      c -
      Returns:
    • containsAll

      public boolean containsAll(float[] a)
      Specified by:
      containsAll in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • disjoint

      public boolean disjoint(FloatList c)
      Specified by:
      disjoint in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      c -
      Returns:
    • disjoint

      public boolean disjoint(float[] b)
      Specified by:
      disjoint in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      b -
      Returns:
    • intersection

      public FloatList intersection(FloatList b)
      Specified by:
      intersection in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      b -
      Returns:
      See Also:
    • intersection

      public FloatList intersection(float[] a)
      Specified by:
      intersection in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • difference

      public FloatList difference(FloatList b)
      Specified by:
      difference in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      b -
      Returns:
      See Also:
    • difference

      public FloatList difference(float[] a)
      Specified by:
      difference in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • symmetricDifference

      public FloatList symmetricDifference(FloatList b)
      Specified by:
      symmetricDifference in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      b -
      Returns:
      this.difference(b).addAll(b.difference(this))
      See Also:
    • symmetricDifference

      public FloatList symmetricDifference(float[] a)
      Specified by:
      symmetricDifference in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      a -
      Returns:
    • occurrencesOf

      public int occurrencesOf(float objectToFind)
      Parameters:
      objectToFind -
      Returns:
    • indexOf

      public int indexOf(float e)
      Parameters:
      e -
      Returns:
    • indexOf

      public int indexOf(int fromIndex, float e)
      Parameters:
      fromIndex -
      e -
      Returns:
    • lastIndexOf

      public int lastIndexOf(float e)
      Last index of.
      Parameters:
      e -
      Returns:
    • lastIndexOf

      public int lastIndexOf(int fromIndex, float e)
      Last index of.
      Parameters:
      fromIndex - the start index to traverse backwards from. Inclusive.
      e -
      Returns:
    • min

      public u.OptionalFloat min()
      Returns:
    • min

      public u.OptionalFloat min(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • median

      public u.OptionalFloat median()
      Returns:
    • median

      public u.OptionalFloat median(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • max

      public u.OptionalFloat max()
      Returns:
    • max

      public u.OptionalFloat max(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • kthLargest

      public u.OptionalFloat kthLargest(int k)
      Parameters:
      k -
      Returns:
    • kthLargest

      public u.OptionalFloat kthLargest(int fromIndex, int toIndex, int k)
      Parameters:
      fromIndex -
      toIndex -
      k -
      Returns:
    • sum

      public float sum()
      Returns:
    • sum

      public float sum(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • average

      public u.OptionalDouble average()
      Returns:
    • average

      public u.OptionalDouble average(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • forEach

      public <E extends Exception> void forEach(Throwables.FloatConsumer<E> action) throws E
      Type Parameters:
      E -
      Parameters:
      action -
      Throws:
      E - the e
    • forEach

      public <E extends Exception> void forEach(int fromIndex, int toIndex, Throwables.FloatConsumer<E> action) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      action -
      Throws:
      E - the e
    • forEachIndexed

      public <E extends Exception> void forEachIndexed(Throwables.IndexedFloatConsumer<E> action) throws E
      Type Parameters:
      E -
      Parameters:
      action -
      Throws:
      E - the e
    • forEachIndexed

      public <E extends Exception> void forEachIndexed(int fromIndex, int toIndex, Throwables.IndexedFloatConsumer<E> action) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      action -
      Throws:
      E - the e
    • first

      public u.OptionalFloat first()
      Returns:
    • last

      public u.OptionalFloat last()
      Returns:
    • findFirst

      public <E extends Exception> u.OptionalFloat findFirst(Throwables.FloatPredicate<E> predicate) throws E
      Type Parameters:
      E -
      Parameters:
      predicate -
      Returns:
      Throws:
      E - the e
    • findLast

      public <E extends Exception> u.OptionalFloat findLast(Throwables.FloatPredicate<E> predicate) throws E
      Type Parameters:
      E -
      Parameters:
      predicate -
      Returns:
      Throws:
      E - the e
    • findFirstIndex

      public <E extends Exception> u.OptionalInt findFirstIndex(Throwables.FloatPredicate<E> predicate) throws E
      Find first index.
      Type Parameters:
      E -
      Parameters:
      predicate -
      Returns:
      Throws:
      E - the e
    • findLastIndex

      public <E extends Exception> u.OptionalInt findLastIndex(Throwables.FloatPredicate<E> predicate) throws E
      Find last index.
      Type Parameters:
      E -
      Parameters:
      predicate -
      Returns:
      Throws:
      E - the e
    • allMatch

      public <E extends Exception> boolean allMatch(Throwables.FloatPredicate<E> filter) throws E
      Returns whether all elements of this List match the provided predicate.
      Type Parameters:
      E -
      Parameters:
      filter -
      Returns:
      Throws:
      E - the e
    • allMatch

      public <E extends Exception> boolean allMatch(int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      filter -
      Returns:
      Throws:
      E - the e
    • anyMatch

      public <E extends Exception> boolean anyMatch(Throwables.FloatPredicate<E> filter) throws E
      Returns whether any elements of this List match the provided predicate.
      Type Parameters:
      E -
      Parameters:
      filter -
      Returns:
      Throws:
      E - the e
    • anyMatch

      public <E extends Exception> boolean anyMatch(int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      filter -
      Returns:
      Throws:
      E - the e
    • noneMatch

      public <E extends Exception> boolean noneMatch(Throwables.FloatPredicate<E> filter) throws E
      Returns whether no elements of this List match the provided predicate.
      Type Parameters:
      E -
      Parameters:
      filter -
      Returns:
      Throws:
      E - the e
    • noneMatch

      public <E extends Exception> boolean noneMatch(int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      filter -
      Returns:
      Throws:
      E - the e
    • count

      public <E extends Exception> int count(Throwables.FloatPredicate<E> filter) throws E
      Type Parameters:
      E -
      Parameters:
      filter -
      Returns:
      Throws:
      E - the e
    • count

      public <E extends Exception> int count(int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      filter -
      Returns:
      Throws:
      E - the e
    • filter

      public <E extends Exception> FloatList filter(Throwables.FloatPredicate<E> filter) throws E
      Type Parameters:
      E -
      Parameters:
      filter -
      Returns:
      a new List with the elements match the provided predicate.
      Throws:
      E - the e
    • filter

      public <E extends Exception> FloatList filter(int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      filter -
      Returns:
      Throws:
      E - the e
    • filter

      public <E extends Exception> FloatList filter(Throwables.FloatPredicate<E> filter, int max) throws E
      Type Parameters:
      E -
      Parameters:
      filter -
      max -
      Returns:
      a new List with the elements match the provided predicate.
      Throws:
      E - the e
    • filter

      public <E extends Exception> FloatList filter(int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter, int max) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      filter -
      max -
      Returns:
      Throws:
      E - the e
    • map

      public <E extends Exception> FloatList map(Throwables.FloatUnaryOperator<E> mapper) throws E
      Type Parameters:
      E -
      Parameters:
      mapper -
      Returns:
      Throws:
      E - the e
    • map

      public <E extends Exception> FloatList map(int fromIndex, int toIndex, Throwables.FloatUnaryOperator<E> mapper) throws E
      Type Parameters:
      E -
      Parameters:
      fromIndex -
      toIndex -
      mapper -
      Returns:
      Throws:
      E - the e
    • mapToObj

      public <T, E extends Exception> List<T> mapToObj(Throwables.FloatFunction<? extends T,E> mapper) throws E
      Map to obj.
      Type Parameters:
      T -
      E -
      Parameters:
      mapper -
      Returns:
      Throws:
      E - the e
    • mapToObj

      public <T, E extends Exception> List<T> mapToObj(int fromIndex, int toIndex, Throwables.FloatFunction<? extends T,E> mapper) throws E
      Map to obj.
      Type Parameters:
      T -
      E -
      Parameters:
      fromIndex -
      toIndex -
      mapper -
      Returns:
      Throws:
      E - the e
    • reduce

      public <E extends Exception> u.OptionalFloat reduce(Throwables.FloatBinaryOperator<E> accumulator) throws E
      This is equivalent to:
       
          if (isEmpty()) {
              return OptionalFloat.empty();
          }
      
          float result = elementData[0];
      
          for (int i = 1; i < size; i++) {
              result = accumulator.applyAsFloat(result, elementData[i]);
          }
      
          return OptionalFloat.of(result);
       
       
      Type Parameters:
      E -
      Parameters:
      accumulator -
      Returns:
      Throws:
      E - the e
    • reduce

      public <E extends Exception> float reduce(float identity, Throwables.FloatBinaryOperator<E> accumulator) throws E
      This is equivalent to:
       
           if (isEmpty()) {
               return identity;
           }
      
           float result = identity;
      
           for (int i = 0; i < size; i++) {
               result = accumulator.applyAsFloat(result, elementData[i]);
          }
      
           return result;
       
       
      Type Parameters:
      E -
      Parameters:
      identity -
      accumulator -
      Returns:
      Throws:
      E - the e
    • distinct

      public FloatList distinct(int fromIndex, int toIndex)
      Specified by:
      distinct in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • hasDuplicates

      public boolean hasDuplicates()
      Checks for duplicates.
      Specified by:
      hasDuplicates in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • top

      public FloatList top(int n)
      Parameters:
      n -
      Returns:
    • top

      public FloatList top(int fromIndex, int toIndex, int n)
      Parameters:
      fromIndex -
      toIndex -
      n -
      Returns:
    • top

      public FloatList top(int n, Comparator<? super Float> cmp)
      Parameters:
      n -
      cmp -
      Returns:
    • top

      public FloatList top(int fromIndex, int toIndex, int n, Comparator<? super Float> cmp)
      Parameters:
      fromIndex -
      toIndex -
      n -
      cmp -
      Returns:
    • isSorted

      public boolean isSorted()
      Specified by:
      isSorted in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • sort

      public void sort()
      Sort.
      Specified by:
      sort in class PrimitiveList<Float,float[],FloatList>
    • parallelSort

      public void parallelSort()
      Parallel sort.
    • reverseSort

      public void reverseSort()
      Reverse sort.
      Specified by:
      reverseSort in class PrimitiveList<Float,float[],FloatList>
    • binarySearch

      public int binarySearch(float valueToFind)
      This List should be sorted first.
      Parameters:
      valueToFind -
      Returns:
    • binarySearch

      public int binarySearch(int fromIndex, int toIndex, float valueToFind)
      This List should be sorted first.
      Parameters:
      fromIndex -
      toIndex -
      valueToFind -
      Returns:
    • reverse

      public void reverse()
      Reverse.
      Specified by:
      reverse in class PrimitiveList<Float,float[],FloatList>
    • reverse

      public void reverse(int fromIndex, int toIndex)
      Specified by:
      reverse in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
    • rotate

      public void rotate(int distance)
      Specified by:
      rotate in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      distance -
    • shuffle

      public void shuffle()
      Shuffle.
      Specified by:
      shuffle in class PrimitiveList<Float,float[],FloatList>
    • shuffle

      public void shuffle(Random rnd)
      Specified by:
      shuffle in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      rnd -
    • swap

      public void swap(int i, int j)
      Specified by:
      swap in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      i -
      j -
    • copy

      public FloatList copy()
      Specified by:
      copy in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • copy

      public FloatList copy(int fromIndex, int toIndex)
      Specified by:
      copy in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • copy

      public FloatList copy(int fromIndex, int toIndex, int step)
      Specified by:
      copy in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      step -
      Returns:
      See Also:
      • CommonUtil.copyOfRange(int[], int, int, int)
    • split

      public List<FloatList> split(int fromIndex, int toIndex, int chunkSize)
      Returns List of FloatList with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).
      Specified by:
      split in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      chunkSize - the desired size of each sub sequence (the last may be smaller).
      Returns:
    • join

      public String join(int fromIndex, int toIndex, char delimiter)
      Specified by:
      join in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      delimiter -
      Returns:
    • join

      public String join(int fromIndex, int toIndex, String delimiter)
      Specified by:
      join in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      delimiter -
      Returns:
    • trimToSize

      public FloatList trimToSize()
      Trim to size.
      Specified by:
      trimToSize in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • clear

      public void clear()
      Clear.
      Specified by:
      clear in class PrimitiveList<Float,float[],FloatList>
    • isEmpty

      public boolean isEmpty()
      Checks if is empty.
      Specified by:
      isEmpty in class PrimitiveList<Float,float[],FloatList>
      Returns:
      true, if is empty
    • size

      public int size()
      Specified by:
      size in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • boxed

      public List<Float> boxed()
      Returns:
    • boxed

      public List<Float> boxed(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • toArray

      public float[] toArray()
      Specified by:
      toArray in class PrimitiveList<Float,float[],FloatList>
      Returns:
    • toDoubleList

      public DoubleList toDoubleList()
      To double list.
      Returns:
    • toCollection

      public <C extends Collection<Float>> C toCollection(int fromIndex, int toIndex, IntFunction<? extends C> supplier)
      Specified by:
      toCollection in class PrimitiveList<Float,float[],FloatList>
      Type Parameters:
      C -
      Parameters:
      fromIndex -
      toIndex -
      supplier -
      Returns:
    • toMultiset

      public Multiset<Float> toMultiset(int fromIndex, int toIndex, IntFunction<Multiset<Float>> supplier)
      Specified by:
      toMultiset in class PrimitiveList<Float,float[],FloatList>
      Parameters:
      fromIndex -
      toIndex -
      supplier -
      Returns:
    • iterator

      public FloatIterator iterator()
      Returns:
    • stream

      public FloatStream stream()
      Returns:
    • stream

      public FloatStream stream(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
    • apply

      public <R, E extends Exception> R apply(Throwables.Function<? super FloatList,? extends R,E> func) throws E
      Specified by:
      apply in class PrimitiveList<Float,float[],FloatList>
      Type Parameters:
      R -
      E -
      Parameters:
      func -
      Returns:
      Throws:
      E - the e
    • applyIfNotEmpty

      public <R, E extends Exception> u.Optional<R> applyIfNotEmpty(Throwables.Function<? super FloatList,? extends R,E> func) throws E
      Apply if not empty.
      Specified by:
      applyIfNotEmpty in class PrimitiveList<Float,float[],FloatList>
      Type Parameters:
      R -
      E -
      Parameters:
      func -
      Returns:
      Throws:
      E - the e
    • accept

      public <E extends Exception> void accept(Throwables.Consumer<? super FloatList,E> action) throws E
      Specified by:
      accept in class PrimitiveList<Float,float[],FloatList>
      Type Parameters:
      E -
      Parameters:
      action -
      Throws:
      E - the e
    • acceptIfNotEmpty

      public <E extends Exception> If.OrElse acceptIfNotEmpty(Throwables.Consumer<? super FloatList,E> action) throws E
      Accept if not empty.
      Specified by:
      acceptIfNotEmpty in class PrimitiveList<Float,float[],FloatList>
      Type Parameters:
      E -
      Parameters:
      action -
      Returns:
      Throws:
      E - the e
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Parameters:
      obj -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns: