public class SparseArrayImpl
extends java.lang.Object
Only ready only access is allowed to data within this class-instance.
Constructor and Description |
---|
SparseArrayImpl(int length) |
Modifier and Type | Method and Description |
---|---|
void |
clear(int index) |
java.lang.Object |
get(int index)
Get the value at the specified index.
|
boolean |
isEmpty() |
boolean |
isPopulated(int index)
Is the slot populated.
|
int |
length() |
void |
set(int index, java.lang.Object value)
Set a value at a given index.
|
SparseArrayImpl |
toSparseArrayImpl() |
java.lang.String |
toString()
Default call, return at most ten entries.
|
java.lang.String |
toString(int maxEntries)
For debugging, returns a string representation of the SparseArrayImpl in the form {Object[i],...} with an upperlimit of maxEnties in the list (zero for all entries) Only place the ellipsis if entries are omitted.
|
public int length()
public java.lang.Object get(int index)
public void set(int index, java.lang.Object value)
index
- a 0-based index into the slots.value
- the value to set into the slot.public boolean isPopulated(int index)
public void clear(int index)
public java.lang.String toString(int maxEntries)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEmpty()
public SparseArrayImpl toSparseArrayImpl()