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

All Superinterfaces:
Comparable<IValue>, Disposable, INonPrimitiveValue, IValue, Serializable
All Known Subinterfaces:
IArrayValue
All Known Implementing Classes:
DefaultArrayValue, DefaultRecordValue

public interface IRecordValue
extends INonPrimitiveValue

Represents a record value.

Version:
CVS $Revision: 1.6 $ $Date: 2005/06/06 19:15:31 $
Author:
Robby

Method Summary
 IRecordValue clone(Map<Object,Object> cloneMap)
          Override to specialize return type.
 int getFieldCount()
          Gets the number of fields in this record.
 IValue getFieldValue(int fieldIndex)
          Gets a record field's value.
 IValueArray getFieldValues()
           
 ILockValue getLockValue()
          Gets the lock value of this record.
 byte[][] linearize(int bitsPerNonPrimitiveValue, ObjectIntTable<INonPrimitiveValue> nonPrimitiveValueIdMap, int bitsPerThreadId, IntIntTable threadOrderMap)
          Linearizes this record value.
 void setFieldValue(int fieldIndex, IValue fieldValue)
          Sets a record field's value.
 String toVerboseString()
          Gets the verbose string representation of this record.
 
Methods inherited from interface edu.ksu.cis.projects.bogor.module.value.INonPrimitiveValue
getReferenceId
 
Methods inherited from interface edu.ksu.cis.projects.bogor.module.value.IValue
equals, getType, getTypeId, hashCode, toString, validate
 
Methods inherited from interface edu.ksu.cis.projects.bogor.util.Disposable
dispose
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getFieldCount

int getFieldCount()
Gets the number of fields in this record.

Returns:
The number of fields in this record. At least zero.

setFieldValue

void setFieldValue(int fieldIndex,
                   IValue fieldValue)
Sets a record field's value.

Parameters:
fieldIndex - The index of the field in this record. Must be greater than zero and less than the field count of this record.
fieldValue - The new value of the field. Must be non-null.
See Also:
RecordType.getFieldIndex(String)

getFieldValue

IValue getFieldValue(int fieldIndex)
Gets a record field's value.

Parameters:
fieldIndex - The index of the field in this record. Must be greater than zero and less than the field count of this record.
Returns:
The field's value. Non-null.
See Also:
RecordType.getFieldIndex(String)

getFieldValues

IValueArray getFieldValues()

getLockValue

ILockValue getLockValue()
Gets the lock value of this record.

Returns:
The lock value of this record. Non-null.

linearize

byte[][] linearize(int bitsPerNonPrimitiveValue,
                   ObjectIntTable<INonPrimitiveValue> nonPrimitiveValueIdMap,
                   int bitsPerThreadId,
                   IntIntTable threadOrderMap)
Linearizes this record value.

Parameters:
bitsPerNonPrimitiveValue - The number of bits used to encode a non-primitive value.
nonPrimitiveValueIdMap - A mapping of non-primitive values to their unique id. Must be non-null.
bitsPerThreadId - The number of bits used to encode a thread descriptor.
threadOrderMap - A mapping of thread descriptors to their order number. Must be non-null.
Returns:
The bit-vectors representation of this record value. Non-null. Each element is non-null.

toVerboseString

String toVerboseString()
Gets the verbose string representation of this record.

Returns:
The verbose string representation of this record. Non-null. The string contains the string representations of this record's fields.

clone

IRecordValue clone(Map<Object,Object> cloneMap)
Override to specialize return type.

Specified by:
clone in interface INonPrimitiveValue
Specified by:
clone in interface IValue
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.