|
|||||||||
| 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.StorageEnumerator
public class StorageEnumerator
Storage elements enumerator (observable location wrapper).
| Field Summary | |
|---|---|
protected int |
location
NOTE: If location ! |
protected Storage |
source
NOTE: source must be ! |
| Constructor Summary | |
|---|---|
StorageEnumerator(Storage source)
NOTE: source must be ! |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
NOTE: Must be synchronized outside with source. |
boolean |
equals(java.lang.Object obj)
NOTE: Must be synchronized outside with source. |
java.lang.Object |
get()
NOTE: Result is value at the current location. |
int |
hashCode()
NOTE: source is not hashed. |
boolean |
hasMoreElements()
|
void |
insertAtPrevious(boolean isChild,
java.lang.Object value)
NOTE: If insertion is impossible here then storage remains unchanged and ArrayStoreException is thrown. enumerator itself is not modified. |
void |
integrityCheck()
NOTE: Check for integrity of this object. source storage is not checked. |
int |
location()
NOTE: Result is the current location (valid or 0). |
java.lang.Object |
nextElement()
NOTE: If no more values (elements) then NoSuchElementException is thrown. |
protected void |
notifyObservers(int oldLocation)
NOTE: This method must be called internally after any change of location. oldLocation must be >= 0. |
void |
notifyObservers(MultiObservable observed,
java.lang.Object argument)
NOTE: It is a dummy method which hides the same method in the superclass. |
java.lang.Object |
setAtPrevious(java.lang.Object value)
NOTE: value may be == null. |
void |
setLocation(int location)
NOTE: If location ! |
Storage |
source()
NOTE: Result ! |
java.lang.String |
toString()
NOTE: source is not represented in the result. |
protected void |
update(int prevLoc,
int location)
NOTE: Called internally only from source observer agent (source ! |
| Methods inherited from class net.sf.ivmaidns.util.ObservedCore |
|---|
addObserver, hasObservers, removeObserver, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Storage source
protected int location
| Constructor Detail |
|---|
public StorageEnumerator(Storage source)
throws java.lang.NullPointerException
java.lang.NullPointerException| Method Detail |
|---|
public final Storage source()
protected final void notifyObservers(int oldLocation)
public final void notifyObservers(MultiObservable observed,
java.lang.Object argument)
notifyObservers in class ObservedCoreobserved - the observed object (may be null, but normally
this).argument - the argument (may be null), describing the occurred
event.ObservedCore.addObserver(net.sf.ivmaidns.util.Notifiable)
protected void update(int prevLoc,
int location)
public final boolean hasMoreElements()
hasMoreElements in interface java.util.Enumeration
public java.lang.Object nextElement()
throws java.util.NoSuchElementException
nextElement in interface java.util.Enumerationjava.util.NoSuchElementException
public void setLocation(int location)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic final int location()
public final java.lang.Object get()
public void insertAtPrevious(boolean isChild,
java.lang.Object value)
throws java.lang.ArrayStoreException
java.lang.ArrayStoreException
public java.lang.Object setAtPrevious(java.lang.Object value)
throws java.lang.ArrayStoreException
java.lang.ArrayStoreExceptionpublic java.lang.Object clone()
clone in interface ReallyCloneableclone in class ObservedCorenull) of this instance.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void integrityCheck()
integrityCheck in interface VerifiableintegrityCheck in class ObservedCore
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||