public class ColumnModel<D,V> extends Object
Constructor and Description |
---|
ColumnModel(Direction direction,
int index) |
ColumnModel(int index,
Function<D,V> column,
CharSequence title,
HttpParameter param) |
Modifier and Type | Method and Description |
---|---|
Function<D,V> |
getColumn() |
Comparator<D> |
getComparator(Comparator<D> defaultCompar)
Get comparator of a sortable column
|
Comparator<D> |
getComparator(Function<D,?> defaultFce)
Get comparator of a sortable column
|
Direction |
getDirection() |
int |
getIndex() |
HttpParameter |
getParam() |
HttpParameter |
getParam(HttpParameter defaultValue) |
CharSequence |
getTitle() |
boolean |
isFiltered() |
protected boolean |
isIncludeColumnType()
Including is more common choice
|
boolean |
isSortable() |
static ColumnModel |
ofCode(String paramValue) |
static <D,V> ColumnModel<D,V> |
ofStub()
Create a stub column
|
void |
setDirection(Direction direction) |
void |
setSortable(Direction direction) |
String |
toCode(boolean opposite)
Write the content to an appendable text stream
|
Appendable |
toCode(boolean opposite,
Appendable writer)
Write the content to an appendable text stream where the default direction is an ASCENDING.
|
String |
toString() |
public ColumnModel(int index, @Nonnull Function<D,V> column, @Nonnull CharSequence title, @Nonnull HttpParameter param)
public int getIndex()
@Nonnull public CharSequence getTitle()
@Nullable public HttpParameter getParam()
@Nonnull public HttpParameter getParam(@Nonnull HttpParameter defaultValue)
public boolean isSortable()
public boolean isFiltered()
public String toCode(boolean opposite)
public Appendable toCode(boolean opposite, @Nonnull Appendable writer) throws IOException
IOException
@Nonnull public Comparator<D> getComparator(@Nullable Function<D,?> defaultFce)
@Nonnull public Comparator<D> getComparator(@Nonnull Comparator<D> defaultCompar)
protected boolean isIncludeColumnType()
@Nonnull public static ColumnModel ofCode(@Nonnull String paramValue)
public static <D,V> ColumnModel<D,V> ofStub()
Copyright 2019-2022, Pavel Ponec