choco.kernel.memory.copy
Class RcLong

java.lang.Object
  extended by choco.kernel.memory.copy.RcLong
All Implemented Interfaces:
RecomputableElement, IStateLong

public final class RcLong
extends Object
implements IStateLong, RecomputableElement


Field Summary
 
Fields inherited from interface choco.kernel.memory.IStateLong
UNKNOWN_LONG
 
Fields inherited from interface choco.kernel.memory.copy.RecomputableElement
BOOL, DOUBLE, DOUBLEVECTOR, INT, INTVECTOR, LONG, LONGVECTOR, NB_TYPE, OBJECT, VECTOR
 
Constructor Summary
RcLong(EnvironmentCopying env)
           
RcLong(EnvironmentCopying env, long i)
           
 
Method Summary
protected  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 deepCopy()
           
 long get()
          Returns the current value.
 IEnvironment getEnvironment()
          Retrieving the environment
 int getTimeStamp()
           
 int getType()
           
 void set(long 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

RcLong

public RcLong(EnvironmentCopying env)

RcLong

public RcLong(EnvironmentCopying env,
              long i)
Method Detail

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

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

_set

protected void _set(long 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 IEnvironment getEnvironment()
Description copied from interface: IStateLong
Retrieving the environment

Specified by:
getEnvironment in interface IStateLong

deepCopy

public long deepCopy()

getType

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

getTimeStamp

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.