T - public class DynamicRow<T> extends Object
| Constructor and Description |
|---|
DynamicRow() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String name)
Check if field is exist.
|
boolean |
getBoolean(String name)
Get boolean value of the specified field.
|
double |
getDouble(String name)
Get double value of the specified field.
|
Map<String,Column> |
getFields() |
long |
getLong(String name)
Get long value of the specified field.
|
String |
getString(String name)
Get string value of the specified field.
|
List<String> |
getStringList(String name)
Get string list value of the specified field.
|
T |
setField(Column column)
Add new column, replace old value if it is exist.
|
T |
setField(String name,
boolean value)
Set field with value of boolean type, replace old value if it is exist.
|
T |
setField(String name,
double value)
Set field with value of double type, replace old value if it is exist.
|
T |
setField(String name,
List<String> value)
Set field with value of string list type, replace old value if it is exist.
|
T |
setField(String name,
long value)
Set field with value of long type, replace old value if it is exist.
|
T |
setField(String name,
String value)
Set field with value of string type, replace old value if it is exist.
|
T |
setField(String name,
String[] value)
Set field with value of string array type, replace old value if it is exist.
|
T |
setFields(List<Column> columns)
Set field with value of string list type, replace old value if it is exist.
|
String |
toString() |
public T setField(String name, String value)
name - field's namevalue - field's new valuepublic T setField(String name, boolean value)
name - field's namevalue - field's new valuepublic T setField(String name, double value)
name - field's namevalue - field's new valuepublic T setField(String name, long value)
name - field's namevalue - field's new valuepublic T setField(String name, List<String> value)
name - field's namevalue - field's new valuepublic T setFields(List<Column> columns)
columns - list of fieldpublic T setField(String name, String[] value)
name - field's namevalue - field's new valuepublic T setField(Column column)
column - new column to addpublic boolean contains(String name)
name - the field's namepublic String getString(String name)
name - the field's nameIllegalStateException - if the value is not string typeNullPointerException - if the field is not existpublic long getLong(String name)
name - the field's nameIllegalStateException - if the value is not long typeNullPointerException - if the field is not existpublic boolean getBoolean(String name)
name - the field's nameIllegalStateException - if the value is not boolean typeNullPointerException - if the field is not existpublic double getDouble(String name)
name - the field's nameIllegalStateException - if the value is not double typeNullPointerException - if the field is not existpublic List<String> getStringList(String name)
name - the field's nameIllegalStateException - if the value is not string list typeNullPointerException - if the field is not existCopyright © 2024. All Rights Reserved.