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