borland Packages Class Hierarchy dx.text Package
TimestampFormatter component
java.lang.Object
+----com.borland.dx.text.ItemFormatter
+----com.borland.dx.text.VariantFormatter
+----com.borland.dx.text.TimestampFormatter
About the TimestampFormatter component
Constructors Properties Methods
Implements Serializable
The TimestampFormatter
class formats and parses timestamp data.
See also: Edit/display mask patterns
TimestampFormatter constructors
TimestampFormatter properties
*Read-only properties **Write-only properties
Properties implemented in this class
TimestampFormatter methods
Methods implemented in this class
TimestampFormatter constructors
TimestampFormatter()
public TimestampFormatter()
Constructs a TimestampFormatter
object.
TimestampFormatter properties
variantType
public int getVariantType()
Returns the Variant
type, which is always Variant.TIME
for TimestampFormatter
.
TimestampFormatter methods
format(com.borland.dx.dataset.Variant)
public final String format(Variant value)
Returns a String
representing the given timestamp stored in the Variant
. A returned empty string indicates a null or empty input value. null means the formatting failed.
Parameters:
value
- The value to be formatted to a
String
.
Overrides:
com.borland.dx.text.VariantFormatter.format(com.borland.dx.dataset.Variant)
parse(com.borland.dx.dataset.Variant, char[], int, int)
public void parse(Variant variant, char[] value, int offset, int len)
A high-speed parse that parses directly into a character array.
Parameters:
variant
- The parsed value (cannot be null).
value
- The character array containing the text to parse.
offset
- The zero-based offset into the character array.
len
- The maximum number of characters in the array to use in the parse.
Overrides:
com.borland.dx.text.VariantFormatter.parse(Variant, char[], int, int)
parse(java.lang.String, com.borland.dx.dataset.Variant)
public final void parse(String stringValue, Variant value)
Analyzes the given String
and produces as output a Variant
containing the approriate value.
Parameters:
stringValue
- The string to be parsed.
value
- The Variant that receives the parsed result.
Overrides:
com.borland.dx.text.VariantFormatter.parse(java.lang.String, com.borland.dx.dataset.Variant)