Interface RecordValued

All Superinterfaces:
RecordTyped, TokenTyped, TokenValued
All Known Subinterfaces:
CloseableRecordValuedIterator, RecordInput, RecordValuedIterator, SeekableRecordValuedIterator, SteppableRecordValued
All Known Implementing Classes:
AbstractRecordValued, CompositeValue, DatasetIterator, RecordMap.RecordMapIterator, RecordRegister, RecordToken, RecordValuedFilter, SparseRecordRegister

public interface RecordValued extends TokenValued, RecordTyped
A TokenValued object containing record data. RecordValued objects are composed of one or more ScalarValued objects, each corresponding the fields of the record schema. Fields are identified both by name and position, as defined in the schema.
  • Method Details

    • getType

      RecordTokenType getType()
      Description copied from interface: TokenValued
      Gets the data type of the token. This type will dictate the valid values that can be contained.
      Specified by:
      getType in interface RecordTyped
      Specified by:
      getType in interface TokenTyped
      Specified by:
      getType in interface TokenValued
      Returns:
      the token type.
    • containsNull

      boolean containsNull()
      Determines if any field in the record is null valued.
      Returns:
      true if at least one field is null valued, false if none are
    • size

      int size()
      Gets the number of fields in the record schema.
      Returns:
      the number of fields
    • getFields

      ScalarValued[] getFields()
      Gets the values of all fields in the record
      Returns:
      an array containing the values of the record's fields
    • getField

      ScalarValued getField(String fieldName)
      Gets the value of the field with the given name.
      Parameters:
      fieldName - the field name
      Returns:
      the field's value
    • getField

      ScalarValued getField(int index)
      Get the field at the given index within the list of fields.
      Parameters:
      index - zero-based index into the field list
      Returns:
      the field's value
    • newFieldIterator

      ScalarValuedIterator newFieldIterator(ScalarTokenType type)
      Create a new iterator for visiting the fields in this RecordValued object. Visitation order will be sorted by the field's index.
      Parameters:
      type - the type of fields over which to iterate
      Returns:
      an iterator over fields of the specified type
    • newFieldIterator

      ScalarValuedIterator newFieldIterator(ScalarTokenType type, String[] selectedFieldNames)
      Create a new iterator for visiting the fields in this RecordValued object. Visitation order will be sorted by the field's index.
      Parameters:
      type - the type of fields over which to iterate
      selectedFieldNames - the fields over which to iterate
      Returns:
      an iterator over the specified fields
    • newFieldIterator

      ScalarValuedIterator newFieldIterator(FieldIteratorProperties properties)
      Create a new iterator for visiting the fields in this RecordValued object. Visitation order will optionally be sorted by the field's index, depending on the value of FieldIteratorProperties.isSorted().
      Parameters:
      properties - properties for the iterator
      Returns:
      an iterator over the fields