FloatPointList

open class FloatPointList

Constructors

FloatPointList
Link copied to clipboard

Constructs an empty list with the specified initial capacity.

open fun FloatPointList(initialCapacity: Int)
FloatPointList
Link copied to clipboard

Constructs an empty list with the specified initial capacity.

open fun FloatPointList(points: Array<Float>)
FloatPointList
Link copied to clipboard

Constructs an empty list with an initial capacity of ten.

open fun FloatPointList()

Functions

add
Link copied to clipboard

Appends the specified element to the end of this list.

open fun add(e: Float): Boolean

Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

open fun add(index: Int, element: Float)
addAll
Link copied to clipboard

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this list, and this list is nonempty.)

open fun addAll(a: Array<Float>): Boolean

Inserts all of the elements in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified collection's iterator.

open fun addAll(index: Int, a: Array<Float>): Boolean
addPoint
Link copied to clipboard

Appends the specified element to the end of this list.

open fun addPoint(point: Array<Float>): Boolean
open fun addPoint(x: Float, y: Float): Boolean

Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

open fun addPoint(pointIndex: Int, point: Array<Float>)
open fun addPoint(pointIndex: Int, x: Float, y: Float)
clear
Link copied to clipboard

Removes all of the elements from this list. The list will be empty after this call returns.

open fun clear()
createArray
Link copied to clipboard
open fun createArray(): Array<Float>
ensureCapacity
Link copied to clipboard

Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.

open fun ensureCapacity(minCapacity: Int)
equals
Link copied to clipboard

Compares the specified object with this list for equality. Returns {@code true} if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements {@code e1} and {@code e2} are equal if {@code (e1==null ? e2==null : * e1.equals(e2))} .) In other words, two lists are defined to be equal if they contain the same elements in the same order.

This implementation first checks if the specified object is this list. If so, it returns {@code true} ; if not, it checks if the specified object is a list. If not, it returns {@code false} ; if so, it iterates over both lists, comparing corresponding pairs of elements. If any comparison returns {@code false} , this method returns {@code false} . If either iterator runs out of elements before the other it returns {@code false} (as the lists are of unequal length); otherwise it returns {@code true} when the iterations complete.

open fun equals(o: Any): Boolean
get
Link copied to clipboard

Returns the element at the specified position in this list.

open fun get(index: Int): Float
getPoint
Link copied to clipboard

Returns the element at the specified position in this list.

open fun getPoint(pointIndex: Int): Array<Float>
open fun getPoint(pointIndex: Int, dst: Array<Float>): Array<Float>
hashCode
Link copied to clipboard

Returns the hash code value for this list.

This implementation uses exactly the code that is used to define the list hash function in the documentation for the method.

open fun hashCode(): Int
isEmpty
Link copied to clipboard

Returns true if this list contains no elements.

open fun isEmpty(): Boolean
mapPoints
Link copied to clipboard
open fun mapPoints(matrix: Matrix): FloatPointList
pointCount
Link copied to clipboard

Returns the number of points in this list.

open fun pointCount(): Int
rawArray
Link copied to clipboard
open fun rawArray(): Array<Float>
remove
Link copied to clipboard

Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).

open fun remove(index: Int): Float

Removes the first occurrence of the specified element from this list, if it is present. If the list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))) (if such an element exists). Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).

open fun remove(o: Any): Boolean
removePoint
Link copied to clipboard

Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).

open fun removePoint(pointIndex: Int)
set
Link copied to clipboard

Replaces the element at the specified position in this list with the specified element.

open fun set(index: Int, element: Float): Float
open fun set(pointIndex: Int, point: Array<Float>)
size
Link copied to clipboard

Returns the number of elements in this list.

open fun size(): Int
trimToSize
Link copied to clipboard

Trims the capacity of this ArrayList instance to be the list's current size. An application can use this operation to minimize the storage of an ArrayList instance.

open fun trimToSize()

Properties

elementData
Link copied to clipboard

The array buffer into which the elements of the ArrayList are stored. The capacity of the ArrayList is the length of this array buffer. Any empty ArrayList with elementData == EMPTY_ELEMENT_DATA will be expanded to DEFAULT_CAPACITY when the first element is added. Package private to allow access from java.util.Collections.

open val elementData: Array<Float>