|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 Storage
public 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 Storage
java.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 Storage
java.lang.IllegalArgumentException
java.lang.ArrayStoreException
public final java.lang.Object getAt(int location)
getAt
in class Storage
public boolean isValidAt(int location)
isValidAt
in class Storage
public int childLocation(int parentLocation, boolean forward) throws java.lang.IllegalArgumentException
childLocation
in class Storage
java.lang.IllegalArgumentException
public int siblingLocation(int location, boolean forward) throws java.lang.IllegalArgumentException
siblingLocation
in class Storage
java.lang.IllegalArgumentException
public int parentLocation(int location) throws java.lang.IllegalArgumentException
parentLocation
in class Storage
java.lang.IllegalArgumentException
public int locationOf(java.lang.Object value, int prevLocation, boolean forward) throws java.lang.IllegalArgumentException
locationOf
in class Storage
java.lang.IllegalArgumentException
public int findLessGreater(java.lang.Object value, boolean greater, int prevLocation, boolean forward) throws java.lang.IllegalArgumentException
findLessGreater
in class Storage
java.lang.IllegalArgumentException
public java.lang.Object clone()
clone
in interface ReallyCloneable
clone
in class Storage
null
) of this
instance.public void integrityCheck()
integrityCheck
in interface Verifiable
integrityCheck
in class Storage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |