|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.networktables2.util.ResizeableArrayObject
edu.wpi.first.wpilibj.networktables2.util.List
public class List
A simple unsynchronized list implementation
Field Summary | |
---|---|
protected int |
size
|
Fields inherited from class edu.wpi.first.wpilibj.networktables2.util.ResizeableArrayObject |
---|
array |
Constructor Summary | |
---|---|
List()
create a new list |
|
List(int initialSize)
Create a new list with a given initial size of the backing array |
Method Summary | |
---|---|
void |
add(Object o)
Add an object to the end of the list |
void |
clear()
clear all elements from the list |
boolean |
contains(Object object)
|
Object |
get(int index)
|
boolean |
isEmpty()
|
void |
remove(int index)
Remove an element from the list |
boolean |
remove(Object object)
remove the first element in the list where Object.equals(Object) is true |
void |
set(int index,
Object obj)
set the value at a given index in the list |
int |
size()
|
Methods inherited from class edu.wpi.first.wpilibj.networktables2.util.ResizeableArrayObject |
---|
arraySize, ensureSize |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int size
Constructor Detail |
---|
public List()
public List(int initialSize)
initialSize
- the initial size of the backing arrayMethod Detail |
---|
public boolean isEmpty()
public int size()
public void add(Object o)
o
- the object to be addedpublic void remove(int index) throws IndexOutOfBoundsException
index
- the index of the element to be removed
IndexOutOfBoundsException
- if the index is not in the listpublic void clear()
public Object get(int index)
index
-
public boolean remove(Object object)
Object.equals(Object)
is true
object
-
public boolean contains(Object object)
object
-
Object.equals(Object)
is true)public void set(int index, Object obj)
index
- the index where the object should be putobj
- the new value at the index
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |