public abstract class DataBuffer
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
java.lang.Object |
arrayObject |
int |
capacity |
int |
end |
int |
growthCap |
int |
growthMin |
int |
start
Extents of valid data.
|
| Constructor and Description |
|---|
DataBuffer() |
DataBuffer(int size)
Creates a char buffer of the given size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(DataBuffer nother) |
void |
clear() |
java.lang.Object |
clone() |
void |
copy(int oldIndex,
int newIndex,
int size)
Copies range of contents to new spot in array.
|
void |
copyTo(java.lang.Object notherArray) |
int |
getSize() |
void |
insert(int whereAt)
Inserts a slot in the array, copying contents up one.
|
boolean |
isEmpty() |
void |
makeRoomFor(int roomNeeded)
This method ensures that there is enough space in the array to fill with
the given number of items.
|
void |
makeRoomFor(int roomNeeded,
int minimumIncrease)
Same as shorter makeRoomFor, except that it will increase the capacity at
least as much as the given minimum - this prevents constant microgrowage.
|
abstract void |
newArray(int size)
Allocates a new, empty array of the given size and assign it to the
arrayObject property.
|
void |
pack() |
void |
remove(int whereAt) |
void |
setToMatch(DataBuffer nother) |
DataBuffer |
subsection(int sectionStart,
int sectionEnd)
Returns a subsection of the array.
|
void |
tidy() |
java.lang.String |
toString() |
public int start
public int end
public int capacity
public java.lang.Object arrayObject
public int growthMin
public int growthCap
public DataBuffer()
public DataBuffer(int size)
public abstract void newArray(int size)
public void makeRoomFor(int roomNeeded)
public void makeRoomFor(int roomNeeded,
int minimumIncrease)
public void pack()
public void tidy()
public void clear()
public int getSize()
public boolean isEmpty()
public void copy(int oldIndex,
int newIndex,
int size)
public void insert(int whereAt)
public void remove(int whereAt)
public DataBuffer subsection(int sectionStart, int sectionEnd)
public void setToMatch(DataBuffer nother)
public void append(DataBuffer nother)
public void copyTo(java.lang.Object notherArray)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Object