- java.lang.Object
-
- com.pervasive.datarush.tokens.record.AbstractRecordValued<ScalarValued>
-
- com.pervasive.datarush.tokens.record.CompositeValue
-
- All Implemented Interfaces:
RecordValued
,TokenValued
,RecordTyped
,TokenTyped
public class CompositeValue extends AbstractRecordValued<ScalarValued>
A composite value comprised of scalar valued fields.Unlike
RecordToken
, there is no guarantee of immutability. While no mutators are provided onCompositeValue
, the underlying fields may refer to mutable objects.
-
-
Constructor Summary
Constructors Constructor Description CompositeValue(ScalarValued[] fields)
Construct a composite from the suppliedScalarValued
objects.CompositeValue(ScalarValued[] fields, ModificationCountProvider modCountProvider)
Construct a composite from the suppliedScalarValued
objects.CompositeValue(RecordTokenType type, ScalarValued[] fields)
Construct a composite with the described schema using the suppliedScalarValued
objects.CompositeValue(RecordTokenType type, ScalarValued[] fields, ModificationCountProvider modCountProvider)
Construct a composite with the described schema using the suppliedScalarValued
objects.
-
Method Summary
-
Methods inherited from class com.pervasive.datarush.tokens.record.AbstractRecordValued
containsNull, getConverter, getField, getField, getFields, getType, isNull, newFieldIterator, newFieldIterator, newFieldIterator, size, toString
-
-
-
-
Constructor Detail
-
CompositeValue
public CompositeValue(ScalarValued[] fields)
Construct a composite from the suppliedScalarValued
objects. The record schema will be generated from the fields using default names.It is assumed that the source is immutable; if this is not the case, field iterators obtained from this object may not behave correctly. Use
CompositeValue(ScalarValued[], ModificationCountProvider)
with an appropriate modification counter instead if this is an issue.- Parameters:
fields
- theScalarValued
objects containing field values
-
CompositeValue
public CompositeValue(ScalarValued[] fields, ModificationCountProvider modCountProvider)
Construct a composite from the suppliedScalarValued
objects. The record schema will be generated from the fields using default names.- Parameters:
fields
- theScalarValued
objects containing field valuesmodCountProvider
- modification count provider. required for notification of underlying changes.
-
CompositeValue
public CompositeValue(RecordTokenType type, ScalarValued[] fields)
Construct a composite with the described schema using the suppliedScalarValued
objects. The field types in the schema will be cross-validated against the given objects.It is assumed that the source is immutable; if this is not the case, field iterators obtained from this object may not behave correctly. Use
CompositeValue(RecordTokenType, ScalarValued[], ModificationCountProvider)
with an appropriate modification counter instead if this is an issue.- Parameters:
type
- the record schema to use for the resulting compositefields
- theScalarValued
objects containing field values- Throws:
DRException
- if the provided field types disagree with the types of the field objects
-
CompositeValue
public CompositeValue(RecordTokenType type, ScalarValued[] fields, ModificationCountProvider modCountProvider)
Construct a composite with the described schema using the suppliedScalarValued
objects. The field types in the schema will be cross-validated against the given objects.- Parameters:
type
- the record schema to use for the resulting compositefields
- theScalarValued
objects containing field valuesmodCountProvider
- modification count provider. required for notification of underlying changes.- Throws:
DRException
- if the provided field types disagree with the types of the field objects
-
-