borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
java.lang.Object +----borland.jbcl.model.ItemFormatter +----borland.jbcl.model.VariantFormatter +----borland.jbcl.model.StringFormatter
Constructors Properties MethodsThe StringFormatter class formats and parses string data.
StringFormatter uses the pattern property of ItemFormatter to access the edit/display mask patterns that are used to format and parse the data.
See also: Edit/display mask patterns
public StringFormatter()Constructs a StringFormatter object.
public int getVariantType()Returns the Variant type of StringFormatter, which is always Variant.STRING.
public final String format(borland.jbcl.util.Variant value)Returns a String representing the given value stored in the supplied object. All reasonable attempts are made to "cast" the type found in the object into the appropriate type specified in the constructor of the implementing classes. A returned empty string indicates a null or empty input value. null means the formatting failed.
Parameters:
Overrides: borland.jbcl.model.VariantFormatter.format(borland.jbcl.util.Variant)
public void parse(borland.jbcl.util.Variant variant, char[] value, int offset, int len)A high-speed parse that parses directly into a character array.
Parameters:
Overrides: borland.jbcl.model.VariantFormatter.parse(borland.jbcl.util.Variant, char[], int, int)
public void parse(java.lang.String stringValue, borland.jbcl.util.Variant value)Analyzes the given String and produces as output a Variant containing the approriate value.
Parameters:
Overrides: borland.jbcl.model.VariantFormatter.parse(java.lang.String, Variant)