choco.kernel.memory
Interface IStateLongVector

All Known Implementing Classes:
RcLongVector, StoredLongVector

public interface IStateLongVector

Describes an search vector with states (describing some history of the data structure).


Field Summary
static Logger LOGGER
           
static int MIN_CAPACITY
          Minimal capacity of a vector
 
Method Summary
 void add(long i)
          Adds a new search at the end of the vector.
 boolean contain(long val)
           
 long get(int index)
          Returns the indexth 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 idx)
          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 and returns the old value
 int size()
          Returns the current size of the stored search vector.
 

Field Detail

LOGGER

static final Logger LOGGER

MIN_CAPACITY

static final int MIN_CAPACITY
Minimal capacity of a vector

See Also:
Constant Field Values
Method Detail

size

int size()
Returns the current size of the stored search vector.


isEmpty

boolean isEmpty()
Checks if the vector is empty.


add

void add(long i)
Adds a new search at the end of the vector.

Parameters:
i - The search to add.

contain

boolean contain(long val)

remove

void remove(int idx)
Removes an int.

Parameters:
idx - The search to remove.

removeLast

void removeLast()
removes the search at the end of the vector. does nothing when called on an empty vector


get

long get(int index)
Returns the indexth element of the vector.


quickGet

long quickGet(int index)
access an element without any bound check

Parameters:
index -
Returns:

set

long set(int index,
         long val)
Assigns a new value val to the element index and returns the old value


quickSet

long quickSet(int index,
              long val)
Assigns a new value val to the element indexth and return the old value without bound check

Parameters:
index - the index where the value is modified
val - the new value
Returns:
the old value

getIterator

DisposableIntIterator getIterator()


Copyright © 2012. All Rights Reserved.