public class BasicRow<T,H extends Header<T>,V> extends Object implements Row<V,T>
| Constructor and Description |
|---|
BasicRow(H header,
V[] values,
int index) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
V |
get(int index)
Returns the entity at a specified index
This method throws a
RuntimeException if anything goes wrong. |
<C> C |
get(int index,
Class<C> cl)
Returns the entity as a specified type
This method throws a
RuntimeException if anything goes wrong. |
V |
get(T headerName)
Returns an entity from the column specified by its head name.
|
<C> C |
get(T headerName,
Class<C> cl)
Returns an entity using head name as a specified type.
|
Boolean |
getBoolean(int index)
Returns entity at an index as
Boolean
This method throws a RuntimeException if anything goes wrong. |
Boolean |
getBoolean(T name)
Returns entity from header name column as
Boolean
This method throws a RuntimeException if anything goes wrong. |
Byte |
getByte(int index)
Returns entity at an index as
Byte
This method throws a RuntimeException if anything goes wrong. |
Byte |
getByte(T headerName)
Returns entity from header name column as
Byte
This method throws a RuntimeException if anything goes wrong. |
Double |
getDouble(int index)
Returns entity at an index as
Double
This method throws a RuntimeException if anything goes wrong. |
Double |
getDouble(T name)
Returns entity from header name column as
Double
This method throws a RuntimeException if anything goes wrong. |
Float |
getFloat(int index)
Returns entity at an index as
Float
This method throws a RuntimeException if anything goes wrong. |
Float |
getFloat(T headerName)
Returns entity from header name column as
Float
This method throws a RuntimeException if anything goes wrong. |
protected H |
getHeader() |
int |
getIndex()
Get index of data row
|
Integer |
getInteger(int index)
Returns entity at an index as
Integer
This method throws a RuntimeException if anything goes wrong. |
Integer |
getInteger(T headerName) |
Long |
getLong(int index)
Returns entity at an index as
Long
This method throws a RuntimeException if anything goes wrong. |
Long |
getLong(T headerName)
Returns entity from header name column as
Long
This method throws a RuntimeException if anything goes wrong. |
Number |
getNumber(int index)
Returns entity from an column index as
Number
This method throws a RuntimeException if anything goes wrong. |
Number |
getNumber(T name)
Returns entity from header name column as
Number
This method throws a RuntimeException if anything goes wrong. |
<C> C |
getOrNull(int index,
Class<C> cl)
Returns the entity as a specified type
This method returns null if anything goes wrong.
|
<C> C |
getOrNull(T headerName,
Class<C> cl)
Returns an entity using head name as a specified type.
|
Short |
getShort(int index)
Returns entity at an index as
Short
This method throws a RuntimeException if anything goes wrong. |
Short |
getShort(T headerName)
Returns entity from header name column as
Short
This method throws a RuntimeException if anything goes wrong. |
String |
getString(int index)
Returns entity at an index as
String
This method throws a RuntimeException if anything goes wrong. |
String |
getString(T name)
Returns entity from header name column as
String
This method throws a RuntimeException if anything goes wrong. |
protected V[] |
getValues()
Returns the values of this row as array
|
boolean |
isNA(int index)
Returns true if the value at the specified index is
NA. |
boolean |
isNA(T headerName)
Returns true if the value at the specified column name is
NA. |
int |
size()
Returns the number of entities in this row
|
Double |
toDouble(int index)
Returns the double value at a specified index.
|
Double |
toDouble(T name)
Returns the double value at a specified header position
|
String |
toString() |
public int getIndex()
public V get(T headerName)
RowRuntimeException if anything goes wrong.protected H getHeader()
public V get(int index)
RowRuntimeException if anything goes wrong.public Double getDouble(int index)
RowDouble
This method throws a RuntimeException if anything goes wrong.protected V[] getValues()
public String getString(int index)
RowString
This method throws a RuntimeException if anything goes wrong.getString in interface Row<V,T>index - entity indexRow.get(int)public int size()
Rowpublic Boolean getBoolean(int index)
RowBoolean
This method throws a RuntimeException if anything goes wrong.getBoolean in interface Row<V,T>index - entity indexBoolean entityRow.get(int)public Double getDouble(T name)
RowDouble
This method throws a RuntimeException if anything goes wrong.public Number getNumber(int index)
Number
This method throws a RuntimeException if anything goes wrong.index - column indexShort entitypublic Number getNumber(T name)
Number
This method throws a RuntimeException if anything goes wrong.name - header nameNumber entitypublic String getString(T name)
RowString
This method throws a RuntimeException if anything goes wrong.public Boolean getBoolean(T name)
RowBoolean
This method throws a RuntimeException if anything goes wrong.getBoolean in interface Row<V,T>name - header nameBoolean entitypublic Double toDouble(int index)
index - index of valuepublic Double toDouble(T name)
name - header nametoDouble(int)public Integer getInteger(int index)
RowInteger
This method throws a RuntimeException if anything goes wrong.getInteger in interface Row<V,T>index - entity indexInteger entityRow.get(int)public Float getFloat(int index)
RowFloat
This method throws a RuntimeException if anything goes wrong.public Float getFloat(T headerName)
RowFloat
This method throws a RuntimeException if anything goes wrong.public Long getLong(int index)
RowLong
This method throws a RuntimeException if anything goes wrong.public Long getLong(T headerName)
RowLong
This method throws a RuntimeException if anything goes wrong.public Short getShort(int index)
RowShort
This method throws a RuntimeException if anything goes wrong.public Short getShort(T headerName)
RowShort
This method throws a RuntimeException if anything goes wrong.public Byte getByte(int index)
RowByte
This method throws a RuntimeException if anything goes wrong.public Byte getByte(T headerName)
RowByte
This method throws a RuntimeException if anything goes wrong.public boolean isNA(T headerName)
NA.headerName - column namepublic boolean isNA(int index)
NA.index - column indexpublic <C> C get(T headerName, Class<C> cl)
RowRuntimeException if anything goes wrong.public <C> C getOrNull(T headerName, Class<C> cl)
Rowpublic <C> C get(int index,
Class<C> cl)
RowRuntimeException if anything goes wrong.public <C> C getOrNull(int index,
Class<C> cl)
RowCopyright © 2017. All rights reserved.