Package org.refcodes.textual
Enum TableStatus
- java.lang.Object
-
- java.lang.Enum<TableStatus>
-
- org.refcodes.textual.TableStatus
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TableStatus>
public enum TableStatus extends java.lang.Enum<TableStatus>
TheTableStatus
provides the status of the table, e.g. whether it has begin printing the header, whether it has continued to print a row or whether it has printed the tail. TheTableStatus
is required by aTablePrinter
(TableBuilder
) to determine whether to do additional table decoration for a print operation or to fail that operation as of an illegal state exception. As far as possible an illegal state exception is to be tried to be prevented by decorating the table automatically by an operation as of the currentTableStatus
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HEADER_BEGIN
The header's top line has been printed.HEADER_CONTINUE
A header columns line has been printed.HEADER_END
The header's bottom line has been printed.NONE
Nothing as been printed yet.ROW_BEGIN
A row's top line has been printed.ROW_CONTINUE
A row columns line has been printed.ROW_END
The row's bottom line has been printed, usually when joining the table with another table.TAIL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TableStatus
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TableStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final TableStatus NONE
Nothing as been printed yet.
-
HEADER_BEGIN
public static final TableStatus HEADER_BEGIN
The header's top line has been printed.
-
HEADER_CONTINUE
public static final TableStatus HEADER_CONTINUE
A header columns line has been printed.
-
HEADER_END
public static final TableStatus HEADER_END
The header's bottom line has been printed.
-
ROW_BEGIN
public static final TableStatus ROW_BEGIN
A row's top line has been printed.
-
ROW_CONTINUE
public static final TableStatus ROW_CONTINUE
A row columns line has been printed.
-
ROW_END
public static final TableStatus ROW_END
The row's bottom line has been printed, usually when joining the table with another table.
-
TAIL
public static final TableStatus TAIL
-
-
Method Detail
-
values
public static TableStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TableStatus c : TableStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TableStatus valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-