public final class RowValue extends java.lang.Object implements java.lang.Iterable<FieldValue>
FieldValue. Usually a row or set of parameters.
A RowValue itself is unmodifiable, but the FieldValue elements it contains are modifiable!
| Modifier and Type | Field and Description |
|---|---|
static RowValue |
EMPTY_ROW_VALUE |
| Constructor and Description |
|---|
RowValue(FieldValue[] fieldValues)
Creates a new
RowValues object. |
| Modifier and Type | Method and Description |
|---|---|
RowValue |
deepCopy()
Copies this
RowValue and the FieldValue elements it contains. |
int |
getCount() |
FieldValue |
getFieldValue(int index)
Gets the
FieldValue at the specified (0-based) index. |
java.util.Iterator<FieldValue> |
iterator() |
static RowValue |
of(FieldValue... fieldValues)
Convenience method to construct a
RowValues object with varargs parameters |
static RowValue |
of(RowDescriptor rowDescriptor,
byte[]... rowData)
Convenience method for populating a row value from a RowDescriptor and byte arrays.
|
public static final RowValue EMPTY_ROW_VALUE
public RowValue(FieldValue[] fieldValues)
RowValues object.
The array is copied, but the FieldValue elements in it are not
The implementation assumes, but does not check that all elements are not null
fieldValues - Field value elementspublic int getCount()
public FieldValue getFieldValue(int index)
FieldValue at the specified (0-based) index.index - 0-based index of the fieldjava.lang.IndexOutOfBoundsException - if index is not 0 <= index < getCountpublic java.util.Iterator<FieldValue> iterator()
iterator in interface java.lang.Iterable<FieldValue>public static RowValue of(FieldValue... fieldValues)
RowValues object with varargs parametersfieldValues - Field value elementsRowValues objectpublic static RowValue of(RowDescriptor rowDescriptor, byte[]... rowData)
Note this method, and the similar RowValueBuilder are mainly intended for
use in FBDatabaseMetaData.
rowDescriptor - The row descriptorrowData - An array of byte arrays with the field data.RowValues objectRowValueBuilderpublic RowValue deepCopy()
RowValue and the FieldValue elements it contains.
The FieldValue elements are copied by use of FieldValue.clone().
As FieldValue is mutable, it is important to consider whether you need to be able
to see modifications to the field data, or if you need fields with the same original data. If the former,
pass the original, if the latter use this method to obtain a copy.
For caveatsCopyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.