choco.kernel.memory.copy
Class RcVector<E>

java.lang.Object
  extended by choco.kernel.memory.copy.RcVector<E>
All Implemented Interfaces:
RecomputableElement, IStateVector<E>

public final class RcVector<E>
extends Object
implements IStateVector<E>, RecomputableElement

Created by IntelliJ IDEA. User: Julien Date: 29 mars 2007 Time: 12:22:50 To change this template use File | Settings | File Templates.


Field Summary
 
Fields inherited from interface choco.kernel.memory.IStateVector
MIN_CAPACITY
 
Fields inherited from interface choco.kernel.memory.copy.RecomputableElement
BOOL, DOUBLE, DOUBLEVECTOR, INT, INTVECTOR, LONG, LONGVECTOR, NB_TYPE, OBJECT, VECTOR
 
Constructor Summary
RcVector(EnvironmentCopying env)
           
RcVector(int[] entries)
           
 
Method Summary
 void _set(E[] vals)
           
 void _set(E[] vals, int timeStamp)
           
 boolean add(E i)
          Adds a new search at the end of the vector.
 E[] deepCopy()
           
 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.
 int getTimeStamp()
           
 int getType()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RcVector

public RcVector(EnvironmentCopying env)

RcVector

public RcVector(int[] entries)
Method Detail

size

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

Specified by:
size in interface IStateVector<E>

isEmpty

public boolean isEmpty()
Checks if the vector is empty.

Specified by:
isEmpty in interface IStateVector<E>

ensureCapacity

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

Specified by:
ensureCapacity in interface IStateVector<E>
Parameters:
minCapacity - the necessary capacity.

add

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

Specified by:
add in interface IStateVector<E>
Parameters:
i - The search to add.

removeLast

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

Specified by:
removeLast in interface IStateVector<E>

get

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

Specified by:
get in interface IStateVector<E>

set

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

Specified by:
set in interface IStateVector<E>

_set

public void _set(E[] vals)

_set

public void _set(E[] vals,
                 int timeStamp)

deepCopy

public E[] deepCopy()

getType

public int getType()
Specified by:
getType in interface RecomputableElement

getTimeStamp

public int getTimeStamp()
Specified by:
getTimeStamp in interface RecomputableElement


Copyright © 2012. All Rights Reserved.