choco.kernel.memory.copy
Class RcInt

java.lang.Object
  extended by choco.kernel.memory.copy.RcInt
All Implemented Interfaces:
RecomputableElement, IStateInt
Direct Known Subclasses:
RcIntProcedure

public class RcInt
extends Object
implements IStateInt, RecomputableElement


Field Summary
 
Fields inherited from interface choco.kernel.memory.IStateInt
MAXINT, MININT, UNKNOWN_INT
 
Fields inherited from interface choco.kernel.memory.copy.RecomputableElement
BOOL, DOUBLE, DOUBLEVECTOR, INT, INTVECTOR, LONG, LONGVECTOR, NB_TYPE, OBJECT, VECTOR
 
Constructor Summary
RcInt(EnvironmentCopying env)
           
RcInt(EnvironmentCopying env, int i)
           
 
Method Summary
protected  void _set(int y, int wstamp)
          Modifies the value without storing the former value on the trailing stack.
 int add(int delta)
          Modifying a StoredInt by an increment.
 int decrement()
          Modifying a StoredInt by subtracting an unit increment.
 int deepCopy()
           
 int get()
          Returns the current value according to the current world.
 IEnvironment getEnvironment()
          Retrieving the environment.
 int getTimeStamp()
           
 int getType()
           
 int increment()
          Modifying a StoredInt by adding an unit increment.
 void set(int y)
          Modifies the value and stores if needed the former value on the trailing stack.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RcInt

public RcInt(EnvironmentCopying env)

RcInt

public RcInt(EnvironmentCopying env,
             int i)
Method Detail

add

public final int add(int delta)
Description copied from interface: IStateInt
Modifying a StoredInt by an increment.

Specified by:
add in interface IStateInt
Parameters:
delta - the value to add to the current value.
Returns:
the updated value

increment

public int increment()
Description copied from interface: IStateInt
Modifying a StoredInt by adding an unit increment.

Specified by:
increment in interface IStateInt
Returns:
the updated value

decrement

public int decrement()
Description copied from interface: IStateInt
Modifying a StoredInt by subtracting an unit increment.

Specified by:
decrement in interface IStateInt
Returns:
the updated value

get

public final int get()
Description copied from interface: IStateInt
Returns the current value according to the current world.

Specified by:
get in interface IStateInt
Returns:
The current value of the storable variable.

set

public final void set(int y)
Description copied from interface: IStateInt
Modifies the value and stores if needed the former value on the trailing stack.

Specified by:
set in interface IStateInt
Parameters:
y - the new value of the variable.

_set

protected void _set(int y,
                    int wstamp)
Modifies the value without storing the former value on the trailing stack.

Parameters:
y - the new value
wstamp - the stamp of the world in which the update is performed

getEnvironment

public final IEnvironment getEnvironment()
Description copied from interface: IStateInt
Retrieving the environment.

Specified by:
getEnvironment in interface IStateInt
Returns:
the environment associated to this variable (the object responsible to manage worlds and storable variables).

deepCopy

public final int deepCopy()

getType

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

getTimeStamp

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

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.