|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Interface of object spatial index. Spatial index is used to allow fast selection of spatial objects belonging to the specified rectangle. Spatial index is implemented using Guttman R-Tree with quadratic split algorithm.
| Method Summary | |
void |
clear()
Remove all objects from the index |
java.util.Iterator |
entryIterator()
Get entry iterator through all members of the index This iterator doesn't support remove() method. |
java.util.Iterator |
entryIterator(RectangleR2 r)
Get entry iterator through objects which rectangle intersects with specified rectangle This iterator doesn't support remove() method. |
IPersistent[] |
get(RectangleR2 r)
Find all objects located in the selected rectangle |
java.util.ArrayList |
getList(RectangleR2 r)
Find all objects located in the selected rectangle |
RectangleR2 |
getWrappingRectangle()
Get wrapping rectangle |
java.util.Iterator |
iterator()
Get iterator through all members of the index This iterator doesn't support remove() method. |
java.util.Iterator |
iterator(RectangleR2 r)
Get objects which rectangle intersects with specified rectangle This iterator doesn't support remove() method. |
void |
put(RectangleR2 r,
IPersistent obj)
Put new object in the index. |
void |
remove(RectangleR2 r,
IPersistent obj)
Remove object with specified enveloping rectangle from the tree. |
int |
size()
Get number of objects in the index |
IPersistent[] |
toArray()
Get array of all members of the index |
IPersistent[] |
toArray(IPersistent[] arr)
Get all objects in the index. |
| Methods inherited from interface org.garret.perst.IPersistent |
assignOid, deallocate, getOid, getStorage, invalidate, isDeleted, isModified, isPersistent, isRaw, load, loadAndModify, makePersistent, modify, onLoad, onStore, recursiveLoading, store |
| Methods inherited from interface java.io.Externalizable |
readExternal, writeExternal |
| Methods inherited from interface org.garret.perst.IResource |
exclusiveLock, exclusiveLock, reset, sharedLock, sharedLock, unlock |
| Methods inherited from interface org.garret.perst.ITable |
select |
| Method Detail |
public void clear()
public java.util.Iterator entryIterator()
public java.util.Iterator entryIterator(RectangleR2 r)
r - selected rectangle
public IPersistent[] get(RectangleR2 r)
r - selected rectangle
public java.util.ArrayList getList(RectangleR2 r)
r - selected rectangle
public RectangleR2 getWrappingRectangle()
null if index is emptypublic java.util.Iterator iterator()
iterator in interface ITablepublic java.util.Iterator iterator(RectangleR2 r)
r - selected rectangle
public void put(RectangleR2 r,
IPersistent obj)
r - enveloping rectangle for the objectobj - object associated with this rectangle. Object can be not yet persistent, in this case
its forced to become persistent by assigning OID to it.
public void remove(RectangleR2 r,
IPersistent obj)
r - enveloping rectangle for the objectobj - object removed from the index
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no such key in the indexpublic int size()
size in interface ITablepublic IPersistent[] toArray()
public IPersistent[] toArray(IPersistent[] arr)
If this index fits in the specified array with room to spare (i.e., the array has more elements than this index), the element in the array immediately following the end of the index is set to null. This is useful in determining the length of this index only if the caller knows that this index does not contain any null elements.)
arr - specified array
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||