choco.kernel.memory
Interface IStateVector<E>

All Known Implementing Classes:
RcVector, StoredVector

public interface IStateVector<E>

Created by IntelliJ IDEA. User: julien Date: 12 juil. 2007 Time: 10:25:47


Field Summary
static int MIN_CAPACITY
          Minimal capacity of a vector
 
Method Summary
 boolean add(E 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.
 E get(int index)
          Returns the indexth element of the vector.
 boolean isEmpty()
          Checks if the vector is empty.
 void removeLast()
          removes the search at the end of the vector.
 E set(int index, E val)
          Assigns a new value val to the element index.
 int size()
          Returns the current size of the stored search vector.
 

Field Detail

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.


ensureCapacity

void ensureCapacity(int minCapacity)
Checks if the capacity is great enough, else the capacity is extended.

Parameters:
minCapacity - the necessary capacity.

add

boolean add(E i)
Adds a new search at the end of the vector.

Parameters:
i - The search to add.

removeLast

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


get

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


set

E set(int index,
      E val)
Assigns a new value val to the element index.



Copyright © 2012. All Rights Reserved.