|
|||||||||
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.IntStorage
public abstract class IntStorage
Abstract class for storage of integers (optimized).
Field Summary | |
---|---|
protected int[] |
links
NOTE: links must be ! |
Constructor Summary | |
---|---|
IntStorage(int initialLength)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
NOTE: Must be synchronized outside. |
int |
emptyLocation()
NOTE: Result is an empty location (result > 0). |
int |
findLessGreater(java.lang.Object value,
boolean greater,
int prevLocation,
boolean forward)
NOTE: If value is not instanceof Integer then 0 is returned. |
abstract int |
findLessGreaterInt(int value,
boolean greater,
int prevLocation,
boolean forward)
NOTE: If prevLocation ! |
java.lang.Object |
getAt(int location)
NOTE: Result ! |
abstract int |
getIntAt(int location)
NOTE: If location is "empty" then 0 is returned. |
int |
insertAt(int prevLoc,
int emptyLocation,
java.lang.Object value)
NOTE: value must be of Integer and insertion after prevLoc must be possible in this storage (according to the semantics), otherwise ArrayStoreException is thrown. |
abstract int |
insertIntAt(int prevLoc,
int emptyLocation,
int value)
NOTE: If prevLoc ! |
void |
integrityCheck()
NOTE: Shallow check for integrity of this object. |
int |
locationOf(java.lang.Object value,
int prevLocation,
boolean forward)
NOTE: If value is not instanceof Integer then 0 is returned. |
abstract int |
locationOfInt(int value,
int prevLocation,
boolean forward)
NOTE: If prevLocation ! |
abstract int |
removeIntAt(int location)
NOTE: If 0 >= location then IllegalArgumentException is thrown. |
java.lang.Object |
setAt(int location,
java.lang.Object value)
NOTE: If 0 >= location then IllegalArgumentException is thrown. |
abstract int |
setIntAt(int location,
int value)
NOTE: If 0 >= location then IllegalArgumentException is thrown. |
Methods inherited from class net.sf.ivmaidns.storage.Storage |
---|
add, addAll, addAll, childLocation, clear, contains, containsAll, containsAll, containsCount, equals, greaterThan, hasChildren, hashCode, insertAtAll, insertAtAll, isValidAt, minimizeCapacity, nextLocation, notifyObservers, notifyObservers, parentLocation, remove, removeAll, removeAll, removeAt, siblingLocation, 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 IntStorage(int initialLength)
Method Detail |
---|
public final int emptyLocation()
Storage
emptyLocation
in class Storage
public final 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 abstract int insertIntAt(int prevLoc, int emptyLocation, int value) throws java.lang.IllegalArgumentException, java.lang.ArrayStoreException
java.lang.IllegalArgumentException
java.lang.ArrayStoreException
public final 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 abstract int setIntAt(int location, int value) throws java.lang.IllegalArgumentException, java.lang.ArrayStoreException
java.lang.IllegalArgumentException
java.lang.ArrayStoreException
public abstract int removeIntAt(int location) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public final java.lang.Object getAt(int location)
getAt
in class Storage
public abstract int getIntAt(int location)
public final int locationOf(java.lang.Object value, int prevLocation, boolean forward) throws java.lang.IllegalArgumentException
locationOf
in class Storage
java.lang.IllegalArgumentException
public abstract int locationOfInt(int value, int prevLocation, boolean forward) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public final int findLessGreater(java.lang.Object value, boolean greater, int prevLocation, boolean forward) throws java.lang.IllegalArgumentException
findLessGreater
in class Storage
java.lang.IllegalArgumentException
public abstract int findLessGreaterInt(int value, boolean greater, int prevLocation, boolean forward) throws java.lang.IllegalArgumentException
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 |