com.ibm.dse.base
Class StringFormat
java.lang.Object
|
+--com.ibm.dse.base.FormatElement
|
+--com.ibm.dse.base.FieldFormat
|
+--com.ibm.dse.base.StringFormat
- Direct Known Subclasses:
- FormsStringFormat
- public class StringFormat
- extends FieldFormat
This class formats a String. This class can convert the String to uppercase or lowercase.
- See Also:
- Serialized Form
Constructor Summary |
StringFormat()
This is the default constructor used to create a StringFormat object. |
StringFormat(java.lang.String aName)
This is the constructor used by the externalizer to create a StringFormat object. |
Method Summary |
java.lang.String |
formatField(DataField aDataField)
Converts the string value of aDataField to lowercase or uppercase as determined
by the value of the formatAs attribute. |
int |
getFormatAs()
Gets the formatAs property (an int) value. |
int |
getUnformatAs()
Gets the unformatAs property (an int) value. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a StringFormat with the aTag attributes. |
void |
setFormatAs(int type)
Sets the value of formatAs based on the value of the type parameter:
1 - lowercase
2 - uppercasse
other - no changes
. |
void |
setUnformatAs(int type)
Sets the value of unformatAs based on the value of the type parameter:
1 - lowercase
2 - uppercasse
other - no changes
. |
java.lang.String |
toString()
Returns a visual representation of this format. |
DataField |
unformatField(java.lang.String aString,
DataField aDataField)
Unformats aString and updates the value of aDataField. |
Methods inherited from class com.ibm.dse.base.FormatElement |
exceptionInfo,
externalizer,
extract,
format,
getDataElementName,
getExternalizer,
getName,
getTagName,
isCacheable,
isConstant,
readExternal,
readExternal,
readObject,
reinitialize,
removeExternal,
rootDecorated,
setDataElementName,
setExternalizer,
setName,
setSize,
toStrings,
toTags,
unformat,
writeExternal,
writeExternal |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
formatAs
public int formatAs
unformatAs
public int unformatAs
StringFormat
public StringFormat()
- This is the default constructor used to create a StringFormat object.
StringFormat
public StringFormat(java.lang.String aName)
throws java.io.IOException
- This is the constructor used by the externalizer to create a StringFormat object.
- Parameters:
aString
- java.lang.String
formatField
public java.lang.String formatField(DataField aDataField)
throws DSEInvalidClassException
- Converts the string value of aDataField to lowercase or uppercase as determined
by the value of the formatAs attribute.
- Overrides:
- formatField in class FieldFormat
- Parameters:
aDataField
- DataField- Returns:
- java.lang.String
getFormatAs
public int getFormatAs()
- Gets the formatAs property (an int) value.
- Returns:
- The formatAs property value.
- See Also:
setFormatAs(int)
getUnformatAs
public int getUnformatAs()
- Gets the unformatAs property (an int) value.
- Returns:
- The unformatAs property value.
- See Also:
setUnformatAs(int)
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
throws java.io.IOException
- Initializes a StringFormat with the aTag attributes.
- Overrides:
- initializeFrom in class FormatElement
- Parameters:
aTag
- com.ibm.dse.base.Tag
setFormatAs
public void setFormatAs(int type)
- Sets the value of formatAs based on the value of the type parameter:
- 1 - lowercase
- 2 - uppercasse
- other - no changes
.
- Parameters:
type
- int
setUnformatAs
public void setUnformatAs(int type)
- Sets the value of unformatAs based on the value of the type parameter:
- 1 - lowercase
- 2 - uppercasse
- other - no changes
.
- Parameters:
type
- int
toString
public java.lang.String toString()
- Returns a visual representation of this format.
- Overrides:
- toString in class FormatElement
- Returns:
- com.ibm.dse.base.Vector
unformatField
public DataField unformatField(java.lang.String aString,
DataField aDataField)
- Unformats aString and updates the value of aDataField.
The unformat converts the String to lowercase or uppercase as determined
by the value of the unformatAs attribute.
- Overrides:
- unformatField in class FieldFormat
- Parameters:
aString
- java.lang.StringaDataField
- DataField- Returns:
- DataField