Package org.moeaframework.util.format
Class Column<T,V>
java.lang.Object
org.moeaframework.util.format.Column<T,V>
- Type Parameters:
T- the type for each record (row)V- the type of value in this column
Defines a column in a
TabularData instance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the custom formatter assigned to this column.getName()The name of this column.Reads the value of this column from the given record (row).voidsetCustomFormatter(Formatter<V> customFormatter) Sets a custom formatter used to display strings.
-
Constructor Details
-
Column
Creates a new column.- Parameters:
name- the name of this columnsupplier- function to read the value from each record
-
-
Method Details
-
getCustomFormatter
Gets the custom formatter assigned to this column.- Returns:
- the custom formatter or
nullif none is assigned
-
setCustomFormatter
Sets a custom formatter used to display strings. If none is set, the default formatting is used.- Parameters:
customFormatter- the custom formatter
-
getName
The name of this column. This may be displayed as the column header depending on the output format.- Returns:
- the name of this column
-
getValue
Reads the value of this column from the given record (row).- Parameters:
row- the record- Returns:
- the value of this column
-