org.jopendocument.util
Class FormatGroup

java.lang.Object
  extended by java.text.Format
      extended by org.jopendocument.util.FormatGroup
All Implemented Interfaces:
Serializable, Cloneable

public class FormatGroup
extends Format

A list of related formats.

Author:
Sylvain CUAZ
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.Format
Format.Field
 
Constructor Summary
FormatGroup(Format... formats)
           
FormatGroup(List<? extends Format> formats)
          Creates a group, which will try to parse with the given formats. format() is done with the first format.
 
Method Summary
 StringBuffer format(Object newVal, StringBuffer toAppendTo, FieldPosition pos)
           
 int getFormatIndex()
           
 List<? extends Format> getFormats()
           
 Object parseObject(String s, ParsePosition pos)
           
 void setFormatIndex(int formatIndex)
           
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatGroup

public FormatGroup(Format... formats)

FormatGroup

public FormatGroup(List<? extends Format> formats)
Creates a group, which will try to parse with the given formats. format() is done with the first format.

Parameters:
formats - a List of Format.
Throws:
IllegalArgumentException - if formats is empty.
Method Detail

getFormats

public final List<? extends Format> getFormats()

format

public StringBuffer format(Object newVal,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
Specified by:
format in class Format

parseObject

public Object parseObject(String s,
                          ParsePosition pos)
Specified by:
parseObject in class Format

getFormatIndex

public final int getFormatIndex()

setFormatIndex

public final void setFormatIndex(int formatIndex)


Copyright © 2010 jOpenDocument All Rights Reserved.