Class AdaptiveFloatArrayList

java.lang.Object
com.amalgamasimulation.utils.container.AdaptiveFloatArrayList
All Implemented Interfaces:
IFloatArrayList

public class AdaptiveFloatArrayList extends Object implements IFloatArrayList
  • Constructor Details

    • AdaptiveFloatArrayList

      public AdaptiveFloatArrayList()
    • AdaptiveFloatArrayList

      public AdaptiveFloatArrayList(int capacity)
  • Method Details

    • size

      public int size()
      Description copied from interface: IFloatArrayList
      Returns the number of values in the list.
      Specified by:
      size in interface IFloatArrayList
      Returns:
      the number of values in the list.
    • add

      public void add(float val)
      Description copied from interface: IFloatArrayList
      Adds val to the end of the list, growing as needed.
      Specified by:
      add in interface IFloatArrayList
      Parameters:
      val - an float value
    • insert

      public void insert(int offset, float value)
      Description copied from interface: IFloatArrayList
      Inserts value into the list at offset. All values including and to the right of offset are shifted to the right.
      Specified by:
      insert in interface IFloatArrayList
      Parameters:
      offset - an int value
      value - an float value
    • get

      public float get(int offset)
      Description copied from interface: IFloatArrayList
      Returns the value at the specified offset.
      Specified by:
      get in interface IFloatArrayList
      Parameters:
      offset - an int value
      Returns:
      an float value
    • set

      public void set(int offset, float val)
      Description copied from interface: IFloatArrayList
      Sets the value at the specified offset.
      Specified by:
      set in interface IFloatArrayList
      Parameters:
      offset - an int value
      val - an float value
    • binarySearch

      public int binarySearch(float value)
      Description copied from interface: IFloatArrayList
      Performs a binary search for value in the entire list. Note that you must @{link #sort sort} the list before doing a search.
      Specified by:
      binarySearch in interface IFloatArrayList
      Parameters:
      value - the value to search for
      Returns:
      the absolute offset in the list of the value, or its negative insertion point into the sorted list.
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: IFloatArrayList
      Tests whether this list contains any values.
      Specified by:
      isEmpty in interface IFloatArrayList
      Returns:
      true if the list is empty.
    • copy

      public IFloatArrayList copy()
      Specified by:
      copy in interface IFloatArrayList
    • toNativeArray

      public float[] toNativeArray()
      Specified by:
      toNativeArray in interface IFloatArrayList
    • clear

      public void clear()
      Specified by:
      clear in interface IFloatArrayList
    • trimToSize

      public void trimToSize()
      Specified by:
      trimToSize in interface IFloatArrayList