choco.kernel.memory.trailing
Class StoredLong
java.lang.Object
choco.kernel.memory.trailing.AbstractStoredObject
choco.kernel.memory.trailing.StoredLong
- All Implemented Interfaces:
- IStateLong
public final class StoredLong
- extends AbstractStoredObject
- implements IStateLong
Method Summary |
void |
_set(long y,
int wstamp)
Modifies the value without storing the former value on the trailing stack. |
long |
add(long delta)
modifying a StoredInt by an increment |
long |
get()
Returns the current value. |
void |
set(long y)
Modifies the value and stores if needed the former value on the
trailing stack. |
String |
toString()
|
myTrail
protected final StoredLongTrail myTrail
StoredLong
public StoredLong(EnvironmentTrailing env)
- Constructs a stored search with an unknown initial value.
Note: this constructor should not be used directly: one should instead
use the IEnvironment factory
StoredLong
public StoredLong(EnvironmentTrailing env,
long d)
- Constructs a stored search with an initial value.
Note: this constructor should not be used directly: one should instead
use the IEnvironment factory
get
public long get()
- Description copied from interface:
IStateLong
- Returns the current value.
- Specified by:
get
in interface IStateLong
set
public void set(long y)
- Description copied from interface:
IStateLong
- Modifies the value and stores if needed the former value on the
trailing stack.
- Specified by:
set
in interface IStateLong
add
public long add(long delta)
- Description copied from interface:
IStateLong
- modifying a StoredInt by an increment
- Specified by:
add
in interface IStateLong
- Returns:
- updated value
_set
public void _set(long y,
int wstamp)
- Modifies the value without storing the former value on the trailing stack.
- Parameters:
y
- the new valuewstamp
- the stamp of the world in which the update is performed
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.