public enum FieldAlignment extends Enum<FieldAlignment>
Enum Constant and Description |
---|
CENTER
Centralizes values
|
LEFT
Aligns values to the left
|
RIGHT
Aligns values to the right
|
Modifier and Type | Method and Description |
---|---|
int |
calculatePadding(int totalLength,
int lengthToWrite)
Calculates how many whites paces to introduce before a value so it is printed as specified by the alignment type.
|
static FieldAlignment |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FieldAlignment[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FieldAlignment LEFT
public static final FieldAlignment CENTER
public static final FieldAlignment RIGHT
public static FieldAlignment[] values()
for (FieldAlignment c : FieldAlignment.values()) System.out.println(c);
public static FieldAlignment 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 int calculatePadding(int totalLength, int lengthToWrite)
totalLength
- the total length available to write for a given fieldlengthToWrite
- the length of a value that will be written to the fieldCopyright © 2019 Univocity Software Pty Ltd. All rights reserved.