F - the type of ScalarValued objects contained in the
recordpublic abstract class AbstractRecordValued<F extends ScalarValued> extends Object implements RecordValued
RecordValued object, providing
implementations of all required methods.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRecordValued(F[] fieldValues,
ModificationCountProvider modificationCountProvider)
Constructs a value using the given elements as the
field elements.
|
protected |
AbstractRecordValued(RecordTokenType type,
F[] fieldValues,
boolean validateType,
ModificationCountProvider modificationCountProvider)
Constructs a value using the given elements as the
field elements, using the specified type.
|
protected |
AbstractRecordValued(RecordTokenType type,
F[] fieldValues,
ModificationCountProvider modificationCountProvider)
Constructs a value using the given elements as the
field elements, using the specified type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsNull()
Determines if any field in the record is null valued.
|
protected TokenConverter |
getConverter()
Gets a memoized converter for this object.
|
F |
getField(int index)
Get the field at the given index within the list of fields.
|
F |
getField(String fieldName)
Gets the value of the field with the given name.
|
F[] |
getFields()
Gets the values of all fields in the record
|
RecordTokenType |
getType()
Gets the data type of the token.
|
boolean |
isNull()
Indicates whether the token is null valued.
|
ScalarValuedIterator |
newFieldIterator(FieldIteratorProperties properties)
Create a new iterator for visiting the fields in this RecordValued object.
|
ScalarValuedIterator |
newFieldIterator(ScalarTokenType type)
Create a new iterator for visiting the fields in this RecordValued object.
|
ScalarValuedIterator |
newFieldIterator(ScalarTokenType type,
String[] selectedFieldNames)
Create a new iterator for visiting the fields in this RecordValued object.
|
int |
size()
Gets the number of fields in the record schema.
|
String |
toString() |
protected AbstractRecordValued(F[] fieldValues, ModificationCountProvider modificationCountProvider)
fieldValues - the elements to use as the fieldsmodificationCountProvider - modification count provider. required for notification of
underlying changes.protected AbstractRecordValued(RecordTokenType type, F[] fieldValues, ModificationCountProvider modificationCountProvider)
type - the record schema to use for the valuefieldValues - the elements to use as the fieldsmodificationCountProvider - modification count provider. required for notification of
underlying changes.DRException - if the provided field types disagree
with the types of the elementsprotected AbstractRecordValued(RecordTokenType type, F[] fieldValues, boolean validateType, ModificationCountProvider modificationCountProvider)
type - the record schema to use for the valuefieldValues - the elements to use as the fieldsvalidateType - indicates whether to cross-validate the type with
the element typesmodificationCountProvider - modification count provider. required for notification of
underlying changes.DRException - if type validation is requested and the provided
field types disagree with the types of the elementspublic final RecordTokenType getType()
TokenValuedgetType in interface RecordValuedgetType in interface TokenValuedgetType in interface RecordTypedgetType in interface TokenTypedpublic final int size()
RecordValuedsize in interface RecordValuedpublic final boolean isNull()
TokenValuedisNull in interface TokenValuedtrue if the token is null valued,
false otherwisepublic final boolean containsNull()
RecordValuedcontainsNull in interface RecordValuedtrue if at least one field is null
valued, false if none arepublic final F getField(int index)
RecordValuedgetField in interface RecordValuedindex - zero-based index into the field listpublic final F getField(String fieldName)
RecordValuedgetField in interface RecordValuedfieldName - the field namepublic final F[] getFields()
RecordValuedgetFields in interface RecordValuedprotected final TokenConverter getConverter()
public final ScalarValuedIterator newFieldIterator(ScalarTokenType type)
RecordValuednewFieldIterator in interface RecordValuedtype - the type of fields over which to iteratepublic final ScalarValuedIterator newFieldIterator(ScalarTokenType type, String[] selectedFieldNames)
RecordValuednewFieldIterator in interface RecordValuedtype - the type of fields over which to iterateselectedFieldNames - the fields over which to iteratepublic final ScalarValuedIterator newFieldIterator(FieldIteratorProperties properties)
RecordValuedFieldIteratorProperties.isSorted().newFieldIterator in interface RecordValuedproperties - properties for the iteratorCopyright © 2024 Actian Corporation. All rights reserved.