|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.ivmaidns.util.ObservedCore
net.sf.ivmaidns.storage.Storage
net.sf.ivmaidns.storage.ObjectStorage
net.sf.ivmaidns.storage.TreeStorage
public class TreeStorage
Class for tree storage.
| Field Summary | |
|---|---|
protected int[] |
links
NOTE: links must be ! |
| Fields inherited from class net.sf.ivmaidns.storage.ObjectStorage |
|---|
elements |
| Constructor Summary | |
|---|---|
TreeStorage()
|
|
| Method Summary | |
|---|---|
int |
childLocation(int parentLocation,
boolean forward)
NOTE: Must be synchronized outside. |
java.lang.Object |
clone()
NOTE: Must be synchronized outside. |
int |
emptyLocation()
NOTE: Result is an empty location (result > 0). |
int |
insertAt(int prevLoc,
int emptyLocation,
java.lang.Object value)
NOTE: ArrayStoreException is thrown only if value == null. |
void |
integrityCheck()
NOTE: Shallow check for integrity of this object. |
protected void |
minimizeCapacity()
NOTE: Must be synchronized outside. |
int |
parentLocation(int location)
NOTE: If location is "empty" then IllegalArgumentException is thrown. |
java.lang.Object |
setAt(int location,
java.lang.Object value)
NOTE: If value is added then it is placed to the end of tree (at the first level). |
int |
siblingLocation(int location,
boolean forward)
NOTE: Must be synchronized outside. |
| Methods inherited from class net.sf.ivmaidns.storage.ObjectStorage |
|---|
findLessGreater, getAt, isValidAt, locationOf |
| Methods inherited from class net.sf.ivmaidns.storage.Storage |
|---|
add, addAll, addAll, clear, contains, containsAll, containsAll, containsCount, equals, greaterThan, hasChildren, hashCode, insertAtAll, insertAtAll, nextLocation, notifyObservers, notifyObservers, remove, removeAll, removeAll, removeAt, toArray, toInlineString, toOutlineString, toString, trimToSize |
| Methods inherited from class net.sf.ivmaidns.util.ObservedCore |
|---|
addObserver, hasObservers, removeObserver |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient int[] links
| Constructor Detail |
|---|
public TreeStorage()
| Method Detail |
|---|
protected void minimizeCapacity()
minimizeCapacity in class ObjectStoragepublic final int emptyLocation()
Storage
emptyLocation in class ObjectStorage
public int insertAt(int prevLoc,
int emptyLocation,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.ArrayStoreException
insertAt in class ObjectStoragejava.lang.IllegalArgumentException
java.lang.ArrayStoreException
public java.lang.Object setAt(int location,
java.lang.Object value)
throws java.lang.IllegalArgumentException
setAt in class ObjectStoragejava.lang.IllegalArgumentException
public int childLocation(int parentLocation,
boolean forward)
throws java.lang.IllegalArgumentException
childLocation in class ObjectStoragejava.lang.IllegalArgumentException
public int siblingLocation(int location,
boolean forward)
throws java.lang.IllegalArgumentException
siblingLocation in class ObjectStoragejava.lang.IllegalArgumentException
public int parentLocation(int location)
throws java.lang.IllegalArgumentException
Storage
parentLocation in class ObjectStoragejava.lang.IllegalArgumentExceptionpublic java.lang.Object clone()
clone in interface ReallyCloneableclone in class ObjectStoragenull) of this instance.public void integrityCheck()
integrityCheck in interface VerifiableintegrityCheck in class ObjectStorage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||