public class FloatsArray extends Object implements FloatsModifiable
Constructor and Description |
---|
FloatsArray() |
FloatsArray(float[] a)
For efficiency, does not clone the array arg.
|
FloatsArray(float[] a,
int n)
For efficiency, does not clone the array arg.
|
FloatsArray(Floats xs)
Clones the sequence arg.
|
FloatsArray(int n) |
Modifier and Type | Method and Description |
---|---|
void |
append(float v) |
void |
append(float[] vs) |
void |
append(float[] vs,
int from,
int to) |
void |
append(FloatBuffer vs) |
void |
append(FloatBuffer vs,
int c) |
void |
append(Floats vs) |
void |
append(Floats vs,
int from,
int to) |
void |
clear() |
void |
compact() |
float[] |
copyOf() |
float[] |
copyOf(int i,
int c) |
void |
copyTo(int i,
float[] dest,
int iDest,
int c) |
void |
ensureCapacity(int minCapacity) |
float |
first() |
void |
insert(int i,
float v) |
void |
insert(int i,
float[] vs) |
void |
insert(int i,
float[] vs,
int from,
int to) |
void |
insert(int i,
FloatBuffer vs) |
void |
insert(int i,
FloatBuffer vs,
int c) |
void |
insert(int i,
Floats vs) |
void |
insert(int i,
Floats vs,
int from,
int to) |
boolean |
isEmpty() |
float |
last() |
int |
n()
Length of the sequence
|
static float[] |
newArray(int oldCapacity,
int minNewCapacity)
Creates a new array whose capacity is at least minNewCapacity, and at least
1.618 * oldCapacity, up to Integer.MAX_VALUE.
|
void |
prepend(float v) |
void |
prepend(float[] vs) |
void |
prepend(float[] vs,
int from,
int to) |
void |
prepend(FloatBuffer vs) |
void |
prepend(FloatBuffer vs,
int c) |
void |
prepend(Floats vs) |
void |
prepend(Floats vs,
int from,
int to) |
void |
prepForAppend(int c)
Makes room in this array for new values to be appended.
|
void |
prepForInsert(int i,
int c)
Makes room in this array for new values to be inserted.
|
void |
prepForPrepend(int c)
Makes room in this array for new values to be prepended.
|
void |
remove(float v)
Removes a single copy of the specified value.
|
void |
removeIndex(int index)
Remove value at index.
|
void |
removeRange(int from,
int to)
Removes values starting at index from (inclusive) to index to (exclusive).
|
void |
set(int i,
float v) |
void |
set(int i,
float[] vs) |
void |
set(int i,
float[] vs,
int from,
int to) |
float |
v(int i)
Value at index i
|
public FloatsArray(float[] a)
public FloatsArray(int n)
public FloatsArray()
public FloatsArray(float[] a, int n)
public FloatsArray(Floats xs)
public float v(int i)
Floats
public int n()
Floats
public void copyTo(int i, float[] dest, int iDest, int c)
public void set(int i, float v)
set
in interface FloatsModifiable
public void set(int i, float[] vs)
set
in interface FloatsModifiable
public void set(int i, float[] vs, int from, int to)
set
in interface FloatsModifiable
public void insert(int i, float v)
insert
in interface FloatsModifiable
public void insert(int i, Floats vs)
insert
in interface FloatsModifiable
public void insert(int i, Floats vs, int from, int to)
insert
in interface FloatsModifiable
public void insert(int i, float[] vs)
insert
in interface FloatsModifiable
public void insert(int i, float[] vs, int from, int to)
insert
in interface FloatsModifiable
public void insert(int i, FloatBuffer vs)
insert
in interface FloatsModifiable
public void insert(int i, FloatBuffer vs, int c)
insert
in interface FloatsModifiable
public void prepForInsert(int i, int c)
this.a
on [i,i+c)
are undefined. Writing meaningful values to these indices is up to the
caller.i
- The index at which new values will be insertedc
- The count of new values that will be insertedpublic void prepend(float v)
prepend
in interface FloatsModifiable
public void prepend(Floats vs)
prepend
in interface FloatsModifiable
public void prepend(Floats vs, int from, int to)
prepend
in interface FloatsModifiable
public void prepend(float[] vs)
prepend
in interface FloatsModifiable
public void prepend(float[] vs, int from, int to)
prepend
in interface FloatsModifiable
public void prepend(FloatBuffer vs)
prepend
in interface FloatsModifiable
public void prepend(FloatBuffer vs, int c)
prepend
in interface FloatsModifiable
public void prepForPrepend(int c)
this.a
on [0,c)
are undefined. Writing meaningful values to these indices is up to the
caller.c
- The count of new values that will be insertedpublic void append(float v)
append
in interface FloatsModifiable
public void append(Floats vs)
append
in interface FloatsModifiable
public void append(Floats vs, int from, int to)
append
in interface FloatsModifiable
public void append(float[] vs)
append
in interface FloatsModifiable
public void append(float[] vs, int from, int to)
append
in interface FloatsModifiable
public void append(FloatBuffer vs)
append
in interface FloatsModifiable
public void append(FloatBuffer vs, int c)
append
in interface FloatsModifiable
public void prepForAppend(int c)
this.a
on [this.n-c,this.n)
are undefined. Writing meaningful values to these indices is up to the
caller.c
- The count of new values that will be appendedpublic void remove(float v)
FloatsModifiable
remove
in interface FloatsModifiable
public void removeRange(int from, int to)
FloatsModifiable
removeRange
in interface FloatsModifiable
public void removeIndex(int index)
FloatsModifiable
removeIndex
in interface FloatsModifiable
public void clear()
clear
in interface FloatsModifiable
public void ensureCapacity(int minCapacity)
ensureCapacity
in interface FloatsModifiable
public void compact()
compact
in interface FloatsModifiable
public static float[] newArray(int oldCapacity, int minNewCapacity)
Copyright © 2013 Metron, Inc.. All rights reserved.