Class MyTableComposition
java.lang.Object
io.github.andreyzebin.gitSql.pretty.MyTableComposition
- All Implemented Interfaces:
TableComposition
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMyTableComposition(String horizontalSplitter, String verticalSplitter, ToIntFunction<Map.Entry<String, Optional<String>>> columnOrder, ToIntFunction<Stream<Map.Entry<String, String>>> indents, boolean headingHorizontalBorders, boolean totalsHorizontalBorders, boolean needAfterRows, String cellSurround, boolean hasTabulation, Function<Map.Entry<String, String>, String> totalsRender, Function<String, String> nullRender, Function<String, String> escape, boolean skipHeading) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanstatic ToIntFunction<Map.Entry<String,Optional<String>>> constantOrder(List<String> cols) static ToIntFunction<Stream<Map.Entry<String,String>>> constantWidth(Map<String, Integer> rowNumber, int defaultValue) static MyTableCompositionbooleanvoidgetAfterRows(TablePrinter tableStream, LinkedList<String> strings) getBrick()getRowConsumer(LinkedList<String> strings) inthashCode()booleanbooleanbooleanbooleanbooleanstatic MyTableCompositionprettyPrint(int defaultWidth, List<AbstractMap.SimpleEntry<String, Integer>> columns) voidprintTotals(TablePrinter tableStream, Function<Map.Entry<String, String>, String> totalsRender, LinkedList<String> strings) static StringvoidvoidsetCellSurround(String cellSurround) voidsetColumnOrder(ToIntFunction<Map.Entry<String, Optional<String>>> columnOrder) voidsetHasTabulation(boolean hasTabulation) voidsetHeadingHorizontalBorders(boolean headingHorizontalBorders) voidsetHorizontalSplitter(String horizontalSplitter) voidsetIndents(ToIntFunction<Stream<Map.Entry<String, String>>> indents) voidsetNeedAfterRows(boolean needAfterRows) voidsetTotalsHorizontalBorders(boolean totalsHorizontalBorders) voidtoString()withCellSurround(String cellSurround) withColumnOrder(ToIntFunction<Map.Entry<String, Optional<String>>> columnOrder) withEscape(Function<String, String> escape) withHasTabulation(boolean hasTabulation) withHeadingHorizontalBorders(boolean headingHorizontalBorders) withHorizontalSplitter(String horizontalSplitter) withIndents(ToIntFunction<Stream<Map.Entry<String, String>>> indents) withNeedAfterRows(boolean needAfterRows) withNullRender(Function<String, String> nullRender) withSkipHeading(boolean skipHeading) withTotalsHorizontalBorders(boolean totalsHorizontalBorders)
-
Constructor Details
-
MyTableComposition
public MyTableComposition(String horizontalSplitter, String verticalSplitter, ToIntFunction<Map.Entry<String, Optional<String>>> columnOrder, ToIntFunction<Stream<Map.Entry<String, String>>> indents, boolean headingHorizontalBorders, boolean totalsHorizontalBorders, boolean needAfterRows, String cellSurround, boolean hasTabulation, Function<Map.Entry<String, String>, String> totalsRender, Function<String, String> nullRender, Function<String, String> escape, boolean skipHeading)
-
-
Method Details
-
dumpCSV
public static MyTableComposition dumpCSV(List<String> rowNumber, String horizontalSplitter, String surround) -
prettyPrint
public static MyTableComposition prettyPrint(int defaultWidth, List<AbstractMap.SimpleEntry<String, Integer>> columns) -
println
-
constantWidth
-
constantOrder
-
getAfterRows
- Specified by:
getAfterRowsin interfaceTableComposition
-
getRowConsumer
- Specified by:
getRowConsumerin interfaceTableComposition
-
renderNullableValue
-
printTotals
public void printTotals(TablePrinter tableStream, Function<Map.Entry<String, String>, String> totalsRender, LinkedList<String> strings) -
builder
-
getHorizontalSplitter
-
getBrick
-
getColumnOrder
-
getIndents
-
isHeadingHorizontalBorders
public boolean isHeadingHorizontalBorders() -
isTotalsHorizontalBorders
public boolean isTotalsHorizontalBorders() -
isNeedAfterRows
public boolean isNeedAfterRows() -
getCellSurround
-
isHasTabulation
public boolean isHasTabulation() -
getTotalsRender
-
getNullRender
-
getEscape
-
isSkipHeading
public boolean isSkipHeading() -
setHorizontalSplitter
-
setBrick
-
setColumnOrder
-
setIndents
-
setHeadingHorizontalBorders
public void setHeadingHorizontalBorders(boolean headingHorizontalBorders) -
setTotalsHorizontalBorders
public void setTotalsHorizontalBorders(boolean totalsHorizontalBorders) -
setNeedAfterRows
public void setNeedAfterRows(boolean needAfterRows) -
setCellSurround
-
setHasTabulation
public void setHasTabulation(boolean hasTabulation) -
setTotalsRender
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withHorizontalSplitter
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withBrick
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withColumnOrder
public MyTableComposition withColumnOrder(ToIntFunction<Map.Entry<String, Optional<String>>> columnOrder) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIndents
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHeadingHorizontalBorders
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTotalsHorizontalBorders
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withNeedAfterRows
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCellSurround
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHasTabulation
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTotalsRender
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withNullRender
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withEscape
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSkipHeading
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-