public class Vector_Int extends Object implements Serializable
Much faster because not synchronized and no cast - Does not double in size each time
| Modifier and Type | Field and Description |
|---|---|
protected int |
current_item |
protected int[] |
items |
| Constructor and Description |
|---|
Vector_Int() |
Vector_Int(int number) |
| Modifier and Type | Method and Description |
|---|---|
void |
add_together(int master,
int child) |
void |
addElement(int value)
add an item
|
void |
clear()
clear the array
|
boolean |
contains(int value)
see if value present
|
void |
deleteElementWithValue(int id)
delete element at
|
int |
elementAt(int id)
get element at
|
int[] |
get()
extract underlying data
|
int |
getCapacity()
return the sizeof array
|
protected static int |
incrementSize(int increment_size) |
void |
keep_larger(int master,
int child) |
void |
keep_smaller(int master,
int child) |
int |
pull()
pull item from top as in LIFO stack
|
void |
push(int value)
put item at top as in LIFO stack
|
void |
removeElementAt(int id)
remove element at
|
void |
resetToCheckpoint()
used to store end of PDF components
|
void |
reuse()
recycle the array by just resetting the pointer
|
void |
set(int[] new_items)
replace underlying data
|
void |
setCheckpoint()
used to rollback array to point
|
void |
setElementAt(int new_name,
int id)
set an element
|
int |
size()
return the size+1 as in last item (so an array of 0 values is 1) if added
If using set, use checkCapacity
|
String |
toString() |
void |
trim() |
protected static int incrementSize(int increment_size)
public final int elementAt(int id)
public final int[] get()
public final void setElementAt(int new_name,
int id)
public final void set(int[] new_items)
public final void keep_larger(int master,
int child)
public final void keep_smaller(int master,
int child)
public final void clear()
public final int size()
public final int getCapacity()
public final void removeElementAt(int id)
public final void deleteElementWithValue(int id)
public final boolean contains(int value)
public final int pull()
public final void push(int value)
public final void addElement(int value)
public final void add_together(int master,
int child)
public final void reuse()
public void trim()
public void resetToCheckpoint()
public void setCheckpoint()
Copyright © 2017. All rights reserved.