|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.data.DataBuffer
public abstract class DataBuffer
Abstract superclass for fast, unsafe arrays or buffers of things that need to grow.
| Field Summary | |
|---|---|
java.lang.Object |
arrayObject
|
int |
capacity
|
int |
end
|
int |
growthCap
|
int |
growthMin
|
int |
start
Extents of valid data. |
| Constructor Summary | |
|---|---|
DataBuffer()
|
|
DataBuffer(int size)
Creates a char buffer of the given size. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int start
public int end
public int capacity
public java.lang.Object arrayObject
public int growthMin
public int growthCap
| Constructor Detail |
|---|
public DataBuffer()
public DataBuffer(int size)
| Method Detail |
|---|
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||