public final class RcIntVector extends IStateIntVector
elementData, environment, MIN_CAPACITY, size
Constructor and Description |
---|
RcIntVector(EnvironmentCopying env,
int[] entries) |
RcIntVector(EnvironmentCopying env,
int initialSize,
int initialValue)
Constructs a stored search vector with an initial size, and initial values.
|
Modifier and Type | Method and Description |
---|---|
void |
_set(int[] vals) |
void |
_set(int[] vals,
int timeStamp) |
void |
add(int i)
Adds a new search at the end of the vector.
|
void |
ensureCapacity(int minCapacity)
Checks if the capacity is great enough, else the capacity
is extended.
|
int |
getTimeStamp() |
int |
quickSet(int index,
int 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.
|
int |
set(int index,
int val)
Assigns a new value
val to the element index . |
contains, deepCopy, get, isEmpty, quickGet, rangeCheck, size
public RcIntVector(EnvironmentCopying env, int initialSize, int initialValue)
env
- The current environment.initialSize
- The initial size.initialValue
- The initial common value.public RcIntVector(EnvironmentCopying env, int[] entries)
public void ensureCapacity(int minCapacity)
minCapacity
- the necessary capacity.public void add(int i)
add
in class IStateIntVector
i
- The search to add.public void removeLast()
removeLast
in class IStateIntVector
public int set(int index, int val)
val
to the element index
.set
in class IStateIntVector
public int quickSet(int index, int val)
IStateIntVector
quickSet
in class IStateIntVector
index
- the index where the value is modifiedval
- the new valuepublic void remove(int i)
IStateIntVector
remove
in class IStateIntVector
i
- The search to remove.public void _set(int[] vals)
public void _set(int[] vals, int timeStamp)
public int getTimeStamp()
Copyright © 2015. All rights reserved.