public static enum StringTablePrinter.StringAlign extends Enum<StringTablePrinter.StringAlign>
Enum Constant and Description |
---|
CENTER
Align the text at the center.
|
LEFT
Align the text on the left.
|
RIGHT
Align the text on the right.
|
Modifier and Type | Method and Description |
---|---|
protected abstract String |
internalPadding(String value,
int valueLength,
int width)
Returns the provided String with spaces to match the expected width (internal method without verification).
|
String |
pad(String value,
int width)
Returns the provided String with spaces to match the expected width.
|
static StringTablePrinter.StringAlign |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StringTablePrinter.StringAlign[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StringTablePrinter.StringAlign LEFT
public static final StringTablePrinter.StringAlign RIGHT
public static final StringTablePrinter.StringAlign CENTER
public static StringTablePrinter.StringAlign[] values()
for (StringTablePrinter.StringAlign c : StringTablePrinter.StringAlign.values()) System.out.println(c);
public static StringTablePrinter.StringAlign valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String pad(String value, int width)
value
- The String to padwidth
- The final length of the String to reachIllegalStateException
- if the provided String exceeds the provided target widthprotected abstract String internalPadding(String value, int valueLength, int width)
value
- The String to padvalueLength
- The String lengthwidth
- The final length of the String to reachCopyright © 2023 CNES. All rights reserved.