public class SparseRecordRegister extends Object implements DataRegister, RecordValued, RecordSettable
RecordValued object.
A RecordRegister can also be thought of as an updateable row of tabular data.| Constructor and Description |
|---|
SparseRecordRegister(RecordTokenType type)
Constructs a new register with the given record type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsNull()
Determines if any field in the record is null valued.
|
ScalarRegister |
getField(int index)
Get the field at the given index within the list of fields.
|
ScalarRegister |
getField(String fieldName)
Gets the value of the field with the given name.
|
ScalarRegister[] |
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.
|
void |
set(TokenValued value)
Sets the contained value to the given token value.
|
void |
setNull()
Sets the contained value to be null valued.
|
void |
setZero()
Sets the contained value to be zero valued.
|
int |
size()
Gets the number of fields in the record schema.
|
String |
toString() |
public SparseRecordRegister(RecordTokenType type)
type - the record schema of the registerpublic final RecordTokenType getType()
TokenValuedgetType in interface RecordSettablegetType in interface RecordValuedgetType in interface TokenValuedgetType in interface RecordTypedgetType in interface TokenTypedpublic final int size()
RecordValuedsize in interface RecordSettablesize 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 void set(TokenValued value)
TokenSettableset in interface TokenSettablevalue - the value to which to set the containerpublic void setNull()
TokenSettablesetNull in interface TokenSettablepublic void setZero()
TokenSettablesetZero in interface TokenSettablepublic final ScalarRegister getField(int index)
RecordValuedgetField in interface RecordSettablegetField in interface RecordValuedindex - zero-based index into the field listpublic final ScalarRegister getField(String fieldName)
RecordValuedgetField in interface RecordSettablegetField in interface RecordValuedfieldName - the field namepublic final ScalarRegister[] getFields()
RecordValuedgetFields in interface RecordSettablegetFields in interface RecordValuedpublic ScalarValuedIterator newFieldIterator(ScalarTokenType type)
RecordValuednewFieldIterator in interface RecordValuedtype - the type of fields over which to iteratepublic ScalarValuedIterator newFieldIterator(ScalarTokenType type, String[] selectedFieldNames)
RecordValuednewFieldIterator in interface RecordValuedtype - the type of fields over which to iterateselectedFieldNames - the fields over which to iteratepublic ScalarValuedIterator newFieldIterator(FieldIteratorProperties properties)
RecordValuedFieldIteratorProperties.isSorted().newFieldIterator in interface RecordValuedproperties - properties for the iteratorCopyright © 2021 Actian Corporation. All rights reserved.