java.lang.String[] |
extract(java.lang.String aString)
Methods inherited from class com.ibm.btt.base.FormatElement |
checkIndexes, exceptionInfo, externalizer, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DateFormat
public DateFormat()
- This constructor creates a DateFormat object.
DateFormat
public DateFormat(java.lang.String aName)
throws java.io.IOException
- This constructor creates the DateFormat object with the id aName.
- Parameters:
aName - java.lang.String
- Throws:
java.io.IOException
extract
public java.lang.String[] extract(java.lang.String aString)
- Extracts a string the length of which is the length of the expected string.
- Overrides:
extract in class FormatElement
- Parameters:
aString - String
- Returns:
- java.lang.String[]
formatField
public java.lang.String formatField(DataField aDataField)
throws DSEInvalidClassException
- Formats a Date using the java.text.SimpleDatFormat class
initialized with the declared parameters.
- Specified by:
formatField in class FieldFormat
- Throws:
DSEInvalidClassException
getFourDigitYear
public boolean getFourDigitYear()
- Returns the value of fourDigitYear.
- Returns:
- boolean
getOrdering
public int getOrdering()
- Returns the value of ordering.
- Returns:
- int
getPattern
public java.lang.String getPattern()
- Calculates the pattern that is used to initialize the SimpleDateFormat.
It is calculated from the parameters of the class.
- Returns:
- java.lang.String
getSeparator
public java.lang.String getSeparator()
- Returns the value of separator.
- Returns:
- java.lang.String
getUseSeparator
public boolean getUseSeparator()
- Returns the value of useSeparator.
- Returns:
- boolean
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
throws java.io.IOException
- Initializes a DateFormat with the Tag attributes.
- Specified by:
initializeFrom in class FormatElement
- Parameters:
aTag - com.ibm.btt.base.Tag
- Returns:
- java.lang.Object
- Throws:
java.io.IOException
setFourDigitYear
public void setFourDigitYear(boolean aBoolean)
- Sets the value of fourDigitYear.
- Parameters:
aBoolean - boolean
setOrdering
public void setOrdering(int anInt)
- Sets the value of ordering.
- Parameters:
anInt - int
setSeparator
public void setSeparator(java.lang.String aSeparator)
- Sets the value of separator.
- Parameters:
aSeparator - java.lang.String
setUseSeparator
public void setUseSeparator(boolean aBoolean)
- Sets the value of useSeparator.
- Parameters:
aBoolean - boolean
toString
public java.lang.String toString()
- Returns an XML representation of this instance.
- Overrides:
toString in class FormatElement
- Returns:
- java.lang.String
unformatField
public DataField unformatField(java.lang.String aString,
DataField aDataField)
throws DSEInvalidArgumentException
- Unformats aString using the parse() method of java.text.SimpleDataFormat
initialize using the parameters.
- Specified by:
unformatField in class FieldFormat
- Throws:
DSEInvalidArgumentException
unformat
public int unformat(int ndxFrom,
int ndxTo,
java.lang.String str,
DataElement aDataElement)
throws DSEInvalidRequestException,
DSEInvalidArgumentException
- The new unformat methods added to the FormatElement to minimize the instances created during the unfomat process that later will be collected by the garbage collector (GC).
- Overrides:
unformat in class FieldFormat
- Parameters:
ndxFrom - is the initial indexndxTo - one is the final index
- Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
(c) Copyright IBM Corporation 1998, 2009
|