T
- type of column entries.public final class ColumnDefinition<T extends java.io.Serializable>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
ColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
java.lang.Class<T> valueType,
boolean nullAllowed)
Creates a new Column definition with the given column name and value type.
|
Modifier and Type | Method and Description |
---|---|
static ColumnDefinition<java.lang.Boolean> |
createBooleanColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
boolean nullAllowed)
Creates a new Column definition for Boolean value types.
|
static <T extends java.io.Serializable> |
createColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
java.lang.Class<T> valueType,
boolean nullAllowed)
Creates a new Column definition with the given column name and value type.
|
static ColumnDefinition<java.lang.Double> |
createDoubleColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
boolean nullAllowed)
Creates a new Column definition for Double value types.
|
static ColumnDefinition<java.lang.Float> |
createFloatColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
boolean nullAllowed)
Creates a new Column definition for Float value types.
|
static ColumnDefinition<java.lang.Integer> |
createIntegerColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
boolean nullAllowed)
Creates a new Column definition for Integer value types.
|
static ColumnDefinition<java.lang.Long> |
createLongColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
boolean nullAllowed)
Creates a new Column definition for Long value types.
|
static ColumnDefinition<java.lang.String> |
createStringColumnDefinition(java.lang.String columnName,
java.lang.String columnDescription,
boolean nullAllowed)
Creates a new Column definition for String value types.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getColumnDescription()
Returns a description of the meaning of the elements in this column.
|
java.lang.String |
getColumnName()
Returns the name (header) of the column.
|
java.lang.Class<T> |
getValueType()
Returns the class in which the values of this column are encoded.
|
int |
hashCode() |
boolean |
isNullAllowed()
Returns true if entries in the column might have null values.
|
java.lang.String |
toString() |
public ColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, java.lang.Class<T> valueType, boolean nullAllowed) throws TableException, java.lang.NullPointerException
TableHelper
for supported column types.
See also createDoubleColumnDefinition(String, String, boolean)
, createIntegerColumnDefinition(String, String, boolean)
,
createStringColumnDefinition(String, String, boolean)
, createBooleanColumnDefinition(String, String, boolean)
, createFloatColumnDefinition(String, String, boolean)
,
createLongColumnDefinition(String, String, boolean)
to create column definitions for value types by default supported by YouScope.
Therefore, these functions do not throw TableExceptions.columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).valueType
- Type of entries in the column.nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.TableException
- Thrown if value type is currently not supported by YouScope.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public java.lang.Class<T> getValueType()
public static <T extends java.io.Serializable> ColumnDefinition<T> createColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, java.lang.Class<T> valueType, boolean nullAllowed) throws TableException, java.lang.NullPointerException
TableHelper
for supported column types.
See also createDoubleColumnDefinition(String, String, boolean)
, createIntegerColumnDefinition(String, String, boolean)
and createStringColumnDefinition(String, String, boolean)
to create column definitions for value types by default supported by YouScope
Therefore, these functions do not throw TableExceptions.columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).valueType
- Type of entries in the column.nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.TableException
- Thrown if value type is currently not supported by YouScope.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public static ColumnDefinition<java.lang.String> createStringColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, boolean nullAllowed) throws java.lang.NullPointerException
columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public static ColumnDefinition<java.lang.Integer> createIntegerColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, boolean nullAllowed) throws java.lang.NullPointerException
columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public static ColumnDefinition<java.lang.Double> createDoubleColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, boolean nullAllowed) throws java.lang.NullPointerException
columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public static ColumnDefinition<java.lang.Float> createFloatColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, boolean nullAllowed) throws java.lang.NullPointerException
columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public static ColumnDefinition<java.lang.Long> createLongColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, boolean nullAllowed) throws java.lang.NullPointerException
columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public static ColumnDefinition<java.lang.Boolean> createBooleanColumnDefinition(java.lang.String columnName, java.lang.String columnDescription, boolean nullAllowed) throws java.lang.NullPointerException
columnName
- Name (header) of this column. Should be a single and short line.columnDescription
- Description of the meaning of the elements in this column. Might contain multiple lines (separated by line breaks).nullAllowed
- True if the values of entries in this column might be null, false if null is forbidden.java.lang.NullPointerException
- Thrown if either columnName, columnDescription or valueType is null.public java.lang.String getColumnName()
public java.lang.String getColumnDescription()
public boolean isNullAllowed()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object