|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpslib.BufferedObject
public class BufferedObject
BufferedObject Class
The BufferedObject object allows input objects to be buffered. The buffer will dynamically restructure itself to preserve ordering.
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Constructor Summary | |
---|---|
BufferedObject(int s)
Create a new object instance with the specified buffer size |
Method Summary | |
---|---|
void |
clear()
Clear the buffer contents |
java.lang.Object |
get()
Return the most recently stored object reference |
java.lang.Object |
get(int i)
Return the object reference stored at the specified index |
boolean |
isInitialised()
Return true if the buffer has been initialised |
void |
resize(int s)
Resize the buffer |
void |
set(java.lang.Object obj)
Store the specified object reference |
int |
size()
Return the current buffer size |
java.lang.Object[] |
toArray(java.lang.Object[] arr_n)
Store the contents of the buffer in the specified array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedObject(int s)
s
- buffer sizeMethod Detail |
---|
public final void set(java.lang.Object obj)
obj
- objectpublic final java.lang.Object get()
public final java.lang.Object get(int i)
i
- index
public final java.lang.Object[] toArray(java.lang.Object[] arr_n)
If the input array size differs from the buffer size, values will be removed or duplicated as required.
arr_n
- object array
public final int size()
public final void resize(int s)
s
- sizepublic final void clear()
public final boolean isInitialised()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |