|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.module.value.DefaultStringValue
public class DefaultStringValue
The default implementation of IStringValue
.
Field Summary | |
---|---|
protected int |
referenceId
Holds the reference id of this string value. |
protected String |
s
Holds the string of this string value. |
protected StringType |
type
Holds the type of this string value. |
Constructor Summary | |
---|---|
protected |
DefaultStringValue(int referenceId,
StringType type,
String s)
Default constructor. |
Method Summary | |
---|---|
IStringValue |
clone(Map<Object,Object> cloneMap)
Override to specialize return type |
int |
compareTo(IValue o)
|
void |
dispose()
Remove references. |
boolean |
equals(Object o)
Classes implementing IValue should provide their own
equality tests. |
int |
getReferenceId()
Gets this non-primitive value reference id. |
String |
getString()
Gets the string of this string value. |
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. |
byte[][] |
linearize()
Linearizes this string value. |
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 class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String s
protected StringType type
protected int referenceId
Constructor Detail |
---|
protected DefaultStringValue(int referenceId, StringType type, String s)
referenceId
- The reference id for this string value.type
- The type for this string value. Must be non-null.s
- The string for this string value. Must be non-null.Method Detail |
---|
public int getReferenceId()
INonPrimitiveValue
getReferenceId
in interface INonPrimitiveValue
public String getString()
IStringValue
getString
in interface IStringValue
public Type getType()
IValue
getType
in interface IValue
Type.getTypeId()
public int getTypeId()
IValue
getTypeId
in interface IValue
Type.getTypeId()
public IStringValue clone(Map<Object,Object> cloneMap)
INonPrimitiveValue
clone
in interface INonPrimitiveValue
clone
in interface IStringValue
clone
in interface IValue
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.
public void dispose()
Disposable
dispose
in interface Disposable
public byte[][] linearize()
IStringValue
linearize
in interface IStringValue
public String toString()
IValue
toString
in interface IValue
toString
in class Object
public void validate(IBogorConfiguration bc)
IValue
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
validate
in interface IValue
bc
- The Bogor configuration to validate to.public boolean equals(Object o)
IValue
IValue
should provide their own
equality tests.
equals
in interface IValue
equals
in class Object
public int hashCode()
IValue
IValue
should provide their own
hashing method.
hashCode
in interface IValue
hashCode
in class Object
public int compareTo(IValue o)
compareTo
in interface Comparable<IValue>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |