choco.kernel.memory
Interface IStateInt

All Known Implementing Classes:
RcInt, RcIntProcedure, StoredInt, StoredIntProcedure

public interface IStateInt

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


Field Summary
static int MAXINT
          Maximum value an integer can be equal to.
static int MININT
          Minimum value an integer can be equal to.
static int UNKNOWN_INT
          Value for an unknown integer.
 
Method Summary
 int add(int delta)
          Modifying a StoredInt by an increment.
 int decrement()
          Modifying a StoredInt by subtracting an unit increment.
 int get()
          Returns the current value according to the current world.
 IEnvironment getEnvironment()
          Retrieving the environment.
 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.
 

Field Detail

UNKNOWN_INT

static final int UNKNOWN_INT
Value for an unknown integer.

See Also:
Constant Field Values

MININT

static final int MININT
Minimum value an integer can be equal to.

See Also:
Constant Field Values

MAXINT

static final int MAXINT
Maximum value an integer can be equal to.

See Also:
Constant Field Values
Method Detail

get

int get()
Returns the current value according to the current world.

Returns:
The current value of the storable variable.

set

void set(int y)
Modifies the value and stores if needed the former value on the trailing stack.

Parameters:
y - the new value of the variable.

add

int add(int delta)
Modifying a StoredInt by an increment.

Parameters:
delta - the value to add to the current value.
Returns:
the updated value

increment

int increment()
Modifying a StoredInt by adding an unit increment.

Returns:
the updated value

decrement

int decrement()
Modifying a StoredInt by subtracting an unit increment.

Returns:
the updated value

getEnvironment

IEnvironment getEnvironment()
Retrieving the environment.

Returns:
the environment associated to this variable (the object responsible to manage worlds and storable variables).


Copyright © 2012. All Rights Reserved.