|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.data.visad.BinaryObjectCache
public class BinaryObjectCache
A list which allows objects to be added at a specific index, padding with nulls if necessary.
Constructor Summary | |
---|---|
BinaryObjectCache()
Create an empty list. |
Method Summary | |
---|---|
int |
add(int index,
Object obj)
Add an object to the end of the list. |
int |
add(Object obj)
Add an object at the specified index. |
Object |
get(int index)
Return the object found at the specified index. |
int |
getIndex(Object obj)
Return the index of the specified object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryObjectCache()
Method Detail |
---|
public int add(Object obj)
obj
- Object to be added.
public int add(int index, Object obj)
obj
- Object to be added.
public Object get(int index) throws IndexOutOfBoundsException
index
- Object index.
IndexOutOfBoundsException
- If the index is outside the
list bounds.public int getIndex(Object obj)
obj
- Object to find in the list,
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |