public class RowSignature extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RowSignature.Builder |
| Modifier and Type | Method and Description |
|---|---|
static RowSignature.Builder |
builder() |
boolean |
contains(String columnName)
Returns whether this signature contains a named column.
|
static RowSignature |
empty() |
boolean |
equals(Object o) |
String |
getColumnName(int columnNumber)
Returns the name of the column at position
columnNumber. |
List<String> |
getColumnNames()
Returns a list of column names in the order they appear in this signature.
|
Optional<ValueType> |
getColumnType(int columnNumber)
Returns the type of the column at position
columnNumber, or empty if the type is unknown. |
Optional<ValueType> |
getColumnType(String columnName)
Returns the type of the column named
columnName, or empty if the type is unknown or the column does
not exist. |
int |
hashCode() |
int |
indexOf(String columnName)
Returns the first position of
columnName in this row signature, or -1 if it does not appear. |
int |
size()
Returns the number of columns in this signature.
|
String |
toString() |
public static RowSignature.Builder builder()
public static RowSignature empty()
public String getColumnName(int columnNumber)
columnNumber.IndexOutOfBoundsException - if columnNumber is not within our row lengthpublic Optional<ValueType> getColumnType(String columnName)
columnName, or empty if the type is unknown or the column does
not exist.public Optional<ValueType> getColumnType(int columnNumber)
columnNumber, or empty if the type is unknown.IndexOutOfBoundsException - if columnNumber is not within our row lengthpublic List<String> getColumnNames()
public int size()
public boolean contains(String columnName)
public int indexOf(String columnName)
columnName in this row signature, or -1 if it does not appear.
Note: the same column name may appear more than once in a signature; if it does, this method will return the
first appearance.Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.