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()
TokenValued
getType
in interface RecordValued
getType
in interface TokenValued
getType
in interface RecordTyped
getType
in interface TokenTyped
public final int size()
RecordValued
size
in interface RecordValued
public final boolean isNull()
TokenValued
isNull
in interface TokenValued
true
if the token is null valued,
false
otherwisepublic final boolean containsNull()
RecordValued
containsNull
in interface RecordValued
true
if at least one field is null
valued, false
if none arepublic final F getField(int index)
RecordValued
getField
in interface RecordValued
index
- zero-based index into the field listpublic final F getField(String fieldName)
RecordValued
getField
in interface RecordValued
fieldName
- the field namepublic final F[] getFields()
RecordValued
getFields
in interface RecordValued
protected final TokenConverter getConverter()
public final ScalarValuedIterator newFieldIterator(ScalarTokenType type)
RecordValued
newFieldIterator
in interface RecordValued
type
- the type of fields over which to iteratepublic final ScalarValuedIterator newFieldIterator(ScalarTokenType type, String[] selectedFieldNames)
RecordValued
newFieldIterator
in interface RecordValued
type
- the type of fields over which to iterateselectedFieldNames
- the fields over which to iteratepublic final ScalarValuedIterator newFieldIterator(FieldIteratorProperties properties)
RecordValued
FieldIteratorProperties.isSorted()
.newFieldIterator
in interface RecordValued
properties
- properties for the iteratorCopyright © 2021 Actian Corporation. All rights reserved.