org.jcon.text
Class FixedLengthFieldPicture

java.lang.Object
  extended by org.jcon.text.FixedLengthFieldPicture
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AlphanumericPicture, ArrayPicture, CurrencyPicture, FixedPointPicture, NumericPicture

public abstract class FixedLengthFieldPicture
extends java.lang.Object
implements java.io.Serializable

A "picture", or format description, for a fixed-width field.

Version:
1.0 1/30/97
Author:
Paul Reavis
See Also:
Serialized Form

Field Summary
protected  java.lang.String blank
           
 
Constructor Summary
FixedLengthFieldPicture()
          Create a new, blank picture.
FixedLengthFieldPicture(int length)
          Create a new, picture of the given length
 
Method Summary
abstract  char[] format(java.lang.Object value)
          Return a character array holding the formatted value corresponding to the provided object.
 int getLength()
           
 void setLength(int newlength)
           
abstract  java.lang.Object unformat(java.lang.String fieldContents)
          Return an object corresponding to the value of a string in this picture's format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blank

protected transient java.lang.String blank
Constructor Detail

FixedLengthFieldPicture

public FixedLengthFieldPicture()
Create a new, blank picture.


FixedLengthFieldPicture

public FixedLengthFieldPicture(int length)
Create a new, picture of the given length

Method Detail

format

public abstract char[] format(java.lang.Object value)
Return a character array holding the formatted value corresponding to the provided object.


unformat

public abstract java.lang.Object unformat(java.lang.String fieldContents)
Return an object corresponding to the value of a string in this picture's format.


getLength

public int getLength()

setLength

public void setLength(int newlength)