com.github.freva.asciitable.ColumnData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ascii-table Show documentation
Show all versions of ascii-table Show documentation
Simple ASCII tables for Java.
package com.github.freva.asciitable;
import java.util.function.Function;
public class ColumnData extends Column {
private final Function getter;
ColumnData(Column column, Function getter) {
super(column.getHeader(), column.getHeaderAlign(), column.getDataAlign(), column.getMaxColumnWidth());
this.getter = getter;
}
public String getCellValue(T object) {
return getter.apply(object);
}
}