flattree.tree
Class PaddedFixedLengthLeaf

java.lang.Object
  extended by flattree.tree.AbstractLeaf
      extended by flattree.tree.ValueLeaf
          extended by flattree.tree.FixedLengthLeaf
              extended by flattree.tree.PaddedFixedLengthLeaf
All Implemented Interfaces:
Leaf

public class PaddedFixedLengthLeaf
extends FixedLengthLeaf

A FixedLengthLeaf which pads its value to fit into the configured length.

See Also:
setPad(char), setPadLocation(flattree.tree.PaddedFixedLengthLeaf.Location)

Nested Class Summary
static class PaddedFixedLengthLeaf.Location
           
 
Field Summary
static PaddedFixedLengthLeaf.Location DEFAULT_LOCATION
           
static char DEFAULT_PAD
           
 
Fields inherited from interface flattree.tree.Leaf
REQUIRED
 
Constructor Summary
PaddedFixedLengthLeaf()
           
PaddedFixedLengthLeaf(String name, int length)
           
PaddedFixedLengthLeaf(String name, int length, boolean lengthRequired)
           
PaddedFixedLengthLeaf(String name, int length, boolean lengthRequired, char pad)
           
PaddedFixedLengthLeaf(String name, int length, boolean lengthRequired, char pad, PaddedFixedLengthLeaf.Location padLocation)
           
PaddedFixedLengthLeaf(String name, int length, char pad)
           
PaddedFixedLengthLeaf(String name, int length, char pad, PaddedFixedLengthLeaf.Location padLocation)
           
 
Method Summary
 char getPad()
           
 PaddedFixedLengthLeaf.Location getPadLocation()
           
protected  String read(StringBuilder builder)
           
 void setPad(char pad)
           
 void setPadLocation(PaddedFixedLengthLeaf.Location align)
           
 void writeValue(WriteLine line, String value)
           
 
Methods inherited from class flattree.tree.FixedLengthLeaf
getLength, getLengthRequired, readValue, setLength, setLengthRequired
 
Methods inherited from class flattree.tree.ValueLeaf
getName, readImpl, setName, writeImpl
 
Methods inherited from class flattree.tree.AbstractLeaf
getThrowOnRead, read, setThrowOnRead, throwOnRead, throwOnRead, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAD

public static final char DEFAULT_PAD
See Also:
Constant Field Values

DEFAULT_LOCATION

public static final PaddedFixedLengthLeaf.Location DEFAULT_LOCATION
Constructor Detail

PaddedFixedLengthLeaf

public PaddedFixedLengthLeaf()

PaddedFixedLengthLeaf

public PaddedFixedLengthLeaf(String name,
                             int length)

PaddedFixedLengthLeaf

public PaddedFixedLengthLeaf(String name,
                             int length,
                             boolean lengthRequired)

PaddedFixedLengthLeaf

public PaddedFixedLengthLeaf(String name,
                             int length,
                             char pad)

PaddedFixedLengthLeaf

public PaddedFixedLengthLeaf(String name,
                             int length,
                             boolean lengthRequired,
                             char pad)

PaddedFixedLengthLeaf

public PaddedFixedLengthLeaf(String name,
                             int length,
                             char pad,
                             PaddedFixedLengthLeaf.Location padLocation)

PaddedFixedLengthLeaf

public PaddedFixedLengthLeaf(String name,
                             int length,
                             boolean lengthRequired,
                             char pad,
                             PaddedFixedLengthLeaf.Location padLocation)
Method Detail

setPad

public void setPad(char pad)

getPad

public char getPad()

setPadLocation

public void setPadLocation(PaddedFixedLengthLeaf.Location align)

getPadLocation

public PaddedFixedLengthLeaf.Location getPadLocation()

writeValue

public void writeValue(WriteLine line,
                       String value)
Overrides:
writeValue in class FixedLengthLeaf

read

protected String read(StringBuilder builder)
Overrides:
read in class FixedLengthLeaf


Copyright © 2011. All Rights Reserved.