net.sf.jmatchparser.util.csv
Enum FixedWidthColumn.Alignment

java.lang.Object
  extended by java.lang.Enum<FixedWidthColumn.Alignment>
      extended by net.sf.jmatchparser.util.csv.FixedWidthColumn.Alignment
All Implemented Interfaces:
Serializable, Comparable<FixedWidthColumn.Alignment>
Enclosing class:
FixedWidthColumn

public static enum FixedWidthColumn.Alignment
extends Enum<FixedWidthColumn.Alignment>

Enumeration of possible column alignments.


Enum Constant Summary
CENTER
          Center alignment, pad on both sides.
FILL
          Filled alignment, do not pad.
LEFT
          Left alignment, pad on the right.
RIGHT
          Right alignment, pad on the left.
 
Method Summary
static FixedWidthColumn.Alignment valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FixedWidthColumn.Alignment[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LEFT

public static final FixedWidthColumn.Alignment LEFT
Left alignment, pad on the right.


RIGHT

public static final FixedWidthColumn.Alignment RIGHT
Right alignment, pad on the left.


CENTER

public static final FixedWidthColumn.Alignment CENTER
Center alignment, pad on both sides. When an odd number of padding is needed, pad one more on the right side.


FILL

public static final FixedWidthColumn.Alignment FILL
Filled alignment, do not pad. Mostly used for reading files so that no padding is removed.

Method Detail

values

public static FixedWidthColumn.Alignment[] 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 (FixedWidthColumn.Alignment c : FixedWidthColumn.Alignment.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FixedWidthColumn.Alignment valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2011. All Rights Reserved.