org.jclarion.clarion.runtime.format
Class PatternFormat

java.lang.Object
  extended by org.jclarion.clarion.runtime.format.Formatter
      extended by org.jclarion.clarion.runtime.format.PatternFormat

public class PatternFormat
extends Formatter

Decode a pattern format is '#' - match a number - if no number render '0' '<' - match a number or blank . - match exact character Pattern decoding is made complicated by fact that '<' is optional - so multiple decoding paths can exist. Solution needs to employ recursion to discover correct path

Author:
barney

Field Summary
 
Fields inherited from class org.jclarion.clarion.runtime.format.Formatter
picture
 
Constructor Summary
PatternFormat(java.lang.String pattern)
           
 
Method Summary
 java.lang.String deformat(java.lang.String input)
           
 boolean format(FormatResolver fr)
           
 java.lang.String format(java.lang.String input)
           
 int getMaxLen()
           
 java.lang.String getPictureRepresentation()
           
 
Methods inherited from class org.jclarion.clarion.runtime.format.Formatter
clearError, construct, getPicture, isError, isStrict, setError, setStrictMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternFormat

public PatternFormat(java.lang.String pattern)
Method Detail

deformat

public java.lang.String deformat(java.lang.String input)
Specified by:
deformat in class Formatter

format

public boolean format(FormatResolver fr)

format

public java.lang.String format(java.lang.String input)
Specified by:
format in class Formatter

getMaxLen

public int getMaxLen()
Specified by:
getMaxLen in class Formatter

getPictureRepresentation

public java.lang.String getPictureRepresentation()
Specified by:
getPictureRepresentation in class Formatter


Copyright © 2010. All Rights Reserved.