edu.ksu.cis.projects.bogor.module.value
Interface IValue

All Superinterfaces:
Comparable<IValue>, Disposable, Serializable
All Known Subinterfaces:
IArrayValue, IComparablePrimitiveExtValue, IDoubleValue, IExpASTValue, IExtValue, IFloatValue, IIntegralValue, IIntValue, ILockValue, ILongValue, INonPrimitiveExtValue, INonPrimitiveValue, INullValue, IPrimitiveExtValue, IPrimitiveValue, IRealValue, IRecordValue, IStringValue
All Known Implementing Classes:
DefaultArrayValue, DefaultDoubleValue, DefaultExpASTValue, DefaultFloatValue, DefaultIntValue, DefaultLockValue, DefaultLongValue, DefaultNullValue, DefaultRecordValue, DefaultStringValue

public interface IValue
extends Disposable, Serializable, Comparable<IValue>

Top level interface for values.

Version:
CVS $Revision: 1.9 $ $Date: 2005/06/07 02:34:45 $
Author:
Robby , Matt Hoosier

Method Summary
 IValue clone(Map<Object,Object> cloneMap)
          Deep clone this value.
 boolean equals(Object o)
          Classes implementing IValue should provide their own equality tests.
 Type getType()
          Gets the type of this value.
 int getTypeId()
          Gets the type id of this value.
 int hashCode()
          Classes implementing IValue should provide their own hashing method.
 String toString()
          Gets the string representation of this value.
 void validate(IBogorConfiguration bc)
           Freshen references to Bogor model checking components and other non-serializable objects.
 
Methods inherited from interface edu.ksu.cis.projects.bogor.util.Disposable
dispose
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getType

Type getType()
Gets the type of this value.

Returns:
The type of this value. Non-null.
See Also:
Type.getTypeId()

getTypeId

int getTypeId()
Gets the type id of this value.

Returns:
The type id of this value.
See Also:
Type.getTypeId()

clone

IValue clone(Map<Object,Object> cloneMap)
Deep clone this value.

Parameters:
cloneMap - Original values (IValue) to their clones ( IValue) mapping. The clone map to solve circular references in values. If this value is a key in the map, then this method returns the value of the key in the map. Must be non-null.
Returns:
The clone of this value. Non-null.

toString

String toString()
Gets the string representation of this value.

Overrides:
toString in class Object
Returns:
The string representation of this value. Non-null.

equals

boolean equals(Object o)
Classes implementing IValue should provide their own equality tests.

Overrides:
equals in class Object

hashCode

int hashCode()
Classes implementing IValue should provide their own hashing method.

Overrides:
hashCode in class Object

validate

void validate(IBogorConfiguration bc)

Freshen references to Bogor model checking components and other non-serializable objects. Generally, this can be done in a few steps:

Model checking components (IModule implementations) should be reacquired by fetching them from the parameter, bc:

     valueFactory = bc.getValueFactory();
     scheduler = bc.getSchedulingStrategist();
 

Any fields storing Type objects should be treated as stale, but still uniquely identifier by their integer typeId field. This can be used as a key to look up the correct Type instances in the new symbol table's typeId-to-type table:

     typeField = bc.getSymbolTable().getTypeIdTypeTable().get(typeField.getTypeId());
 

Any IValueArray objects contained can simply be "chained" by their IValueArray.validate(IBogorConfiguration) method:

     someValueArray.validate(bc);
 

IValue objects contained directly should not be handled manually by this method; they will be dealt with directly when they are visited later

Parameters:
bc - The Bogor configuration to validate to.