|
|||||||||
| 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.FilterStorage
public abstract class FilterStorage
Abstract class for filter storage (virtual storage).
| Field Summary | |
|---|---|
protected Storage |
source
NOTE: Filter storage must be synchronized with source if source ! |
| Constructor Summary | |
|---|---|
FilterStorage()
|
|
| Method Summary | |
|---|---|
int |
childLocation(int parentLocation,
boolean forward)
NOTE: Must be synchronized outside with source if not null. |
java.lang.Object |
clone()
NOTE: Must be synchronized outside with source if not null. |
int |
emptyLocation()
NOTE: Result is an empty location (result > 0). |
int |
findLessGreater(java.lang.Object value,
boolean greater,
int prevLocation,
boolean forward)
NOTE: Must be synchronized outside with source if not null. |
java.lang.Object |
getAt(int location)
NOTE: Not all non-empty locations may be valid. |
int |
insertAt(int prevLoc,
int emptyLocation,
java.lang.Object value)
NOTE: Observers notification is performed. |
void |
integrityCheck()
NOTE: Shallow check for integrity of this object. source storage is not checked. |
boolean |
isValidAt(int location)
NOTE: Must be synchronized outside with source if not null. |
int |
locationOf(java.lang.Object value,
int prevLocation,
boolean forward)
NOTE: Must be synchronized outside with source if not null. |
protected void |
minimizeCapacity()
NOTE: The effectiveness is linear. |
int |
parentLocation(int location)
NOTE: Must be synchronized outside with source if not null. |
java.lang.Object |
setAt(int location,
java.lang.Object value)
NOTE: Observers notification is performed. |
void |
setSource(Storage source)
NOTE: source may be == null. |
int |
siblingLocation(int location,
boolean forward)
NOTE: Must be synchronized outside with source if not null. |
protected void |
update(int prevLoc,
int location,
java.lang.Object oldValue)
NOTE: Called internally only from source observer agent (source ! |
| 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 Storage source
| Constructor Detail |
|---|
public FilterStorage()
| Method Detail |
|---|
public void setSource(Storage source)
protected void update(int prevLoc,
int location,
java.lang.Object oldValue)
protected void minimizeCapacity()
Storage
minimizeCapacity in class Storagepublic final int emptyLocation()
Storage
emptyLocation in class Storage
public int insertAt(int prevLoc,
int emptyLocation,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.ArrayStoreException
insertAt in class Storagejava.lang.IllegalArgumentException
java.lang.ArrayStoreException
public java.lang.Object setAt(int location,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.ArrayStoreException
setAt in class Storagejava.lang.IllegalArgumentException
java.lang.ArrayStoreExceptionpublic final java.lang.Object getAt(int location)
getAt in class Storagepublic boolean isValidAt(int location)
isValidAt in class Storage
public int childLocation(int parentLocation,
boolean forward)
throws java.lang.IllegalArgumentException
childLocation in class Storagejava.lang.IllegalArgumentException
public int siblingLocation(int location,
boolean forward)
throws java.lang.IllegalArgumentException
siblingLocation in class Storagejava.lang.IllegalArgumentException
public int parentLocation(int location)
throws java.lang.IllegalArgumentException
parentLocation in class Storagejava.lang.IllegalArgumentException
public int locationOf(java.lang.Object value,
int prevLocation,
boolean forward)
throws java.lang.IllegalArgumentException
locationOf in class Storagejava.lang.IllegalArgumentException
public int findLessGreater(java.lang.Object value,
boolean greater,
int prevLocation,
boolean forward)
throws java.lang.IllegalArgumentException
findLessGreater in class Storagejava.lang.IllegalArgumentExceptionpublic java.lang.Object clone()
clone in interface ReallyCloneableclone in class Storagenull) of this instance.public void integrityCheck()
integrityCheck in interface VerifiableintegrityCheck in class Storage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||