|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.trailing.StoredLongVector
public class StoredLongVector
Created by IntelliJ IDEA. User: julien Date: May 6, 2010 Time: 12:52:20 PM
Field Summary | |
---|---|
static int |
MIN_CAPACITY
Minimal capacity of a vector |
protected StoredLongVectorTrail |
myTrail
|
int[] |
worldStamps
Contains time stamps for all entries (the world index of the last update for each entry) |
Fields inherited from interface choco.kernel.memory.IStateLongVector |
---|
LOGGER |
Constructor Summary | |
---|---|
StoredLongVector(EnvironmentTrailing env)
Constructs an empty stored search vector. |
|
StoredLongVector(EnvironmentTrailing env,
int initialSize,
long initialValue)
Constructs a stored search vector with an initial size, and initial values. |
|
StoredLongVector(EnvironmentTrailing env,
long[] entries)
|
Method Summary | |
---|---|
long |
_set(int index,
long val,
int stamp)
Sets an element without storing the previous value. |
void |
add(long i)
Adds a new search at the end of the vector. |
boolean |
contain(long val)
|
void |
ensureCapacity(int minCapacity)
Checks if the capacity is great enough, else the capacity is extended. |
long |
get(int index)
Returns the index th element of the vector. |
DisposableIntIterator |
getIterator()
|
boolean |
isEmpty()
Checks if the vector is empty. |
long |
quickGet(int index)
access an element without any bound check |
long |
quickSet(int index,
long val)
Assigns a new value val to the element indexth and return the old value without bound check |
void |
remove(int i)
Removes an int. |
void |
removeLast()
removes the search at the end of the vector. |
long |
set(int index,
long val)
Assigns a new value val to the element index . |
int |
size()
Returns the current size of the stored search vector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_CAPACITY
public int[] worldStamps
protected final StoredLongVectorTrail myTrail
Constructor Detail |
---|
public StoredLongVector(EnvironmentTrailing env, int initialSize, long initialValue)
env
- The current environment.initialSize
- The initial size.initialValue
- The initial common value.public StoredLongVector(EnvironmentTrailing env, long[] entries)
public StoredLongVector(EnvironmentTrailing env)
env
- The current environment.Method Detail |
---|
public int size()
size
in interface IStateLongVector
public boolean isEmpty()
isEmpty
in interface IStateLongVector
public void ensureCapacity(int minCapacity)
minCapacity
- the necessary capacity.public void add(long i)
add
in interface IStateLongVector
i
- The search to add.public void remove(int i)
remove
in interface IStateLongVector
i
- The search to remove.public void removeLast()
removeLast
in interface IStateLongVector
public long get(int index)
index
th element of the vector.
get
in interface IStateLongVector
public final long quickGet(int index)
IStateLongVector
quickGet
in interface IStateLongVector
public boolean contain(long val)
contain
in interface IStateLongVector
public long set(int index, long val)
val
to the element index
.
set
in interface IStateLongVector
public final long quickSet(int index, long val)
IStateLongVector
quickSet
in interface IStateLongVector
index
- the index where the value is modifiedval
- the new value
public long _set(int index, long val, int stamp)
public DisposableIntIterator getIterator()
getIterator
in interface IStateLongVector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |