step.encoding
Class MetaRecord

java.lang.Object
  |
  +--step.encoding.MetaRecord
All Implemented Interfaces:
Serializable, StepObject, StepRecord

public class MetaRecord
extends Object
implements StepRecord

A record that contains another record with interleaved meta-data.

See Also:
MetaEvent, Serialized Form

Nested Class Summary
static class MetaRecord.Factory
           
 
Field Summary
 StepArray data
           
static RecordDef DEFINITION
           
 StepArray metaData
           
 
Fields inherited from interface step.StepRecord
TYPE
 
Constructor Summary
MetaRecord(List data, List metaData)
          Create a new meta record from data segments and meta segments.
MetaRecord(StepArray data, StepArray metaData)
          Create a new meta record from data segments and meta segments.
 
Method Summary
 boolean equals(Object o)
          Compare two MetaRecords for equality.
 FieldIterator fieldIterator()
          Get an iterator for serial access to this record's fields.
 void free()
          Free the memory used by this record.
 int hashCode()
          Get a hash code for this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFINITION

public static final RecordDef DEFINITION

data

public StepArray data

metaData

public StepArray metaData
Constructor Detail

MetaRecord

public MetaRecord(StepArray data,
                  StepArray metaData)
Create a new meta record from data segments and meta segments.

The meta segments should consist of complete encoded records, generally either a MetaEvent or another MetaRecord.

There should be n+1 data segments for n meta segments.


MetaRecord

public MetaRecord(List data,
                  List metaData)
Create a new meta record from data segments and meta segments.

The meta segments should consist of complete encoded records, generally either a MetaEvent or another MetaRecord.

There should be n+1 data segments for n meta segments.

Throws:
ClassCastException - if the list elements are not byte[] objects.
Method Detail

equals

public boolean equals(Object o)
Compare two MetaRecords for equality.

Specified by:
equals in interface StepObject
Overrides:
equals in class Object
Throws:
ClassCastException - if the given object is not a MetaRecord.
NullPointerException - if the given object is null.

hashCode

public int hashCode()
Description copied from interface: StepObject
Get a hash code for this object.

NOTE: All STEP objects must be hashable to support the identifier encoding strategy.

Specified by:
hashCode in interface StepObject
Overrides:
hashCode in class Object

fieldIterator

public FieldIterator fieldIterator()
Description copied from interface: StepRecord
Get an iterator for serial access to this record's fields.

NOTE: The order in which fields are accessed by the iterator should be compatible with the factory associated with this record.

Specified by:
fieldIterator in interface StepRecord
See Also:
RecordFactory

free

public void free()
Free the memory used by this record.

The underlying byte[] objects are freed to the ByteArray.allocator().