|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.base.FormatElement
com.ibm.dse.base.FormatDecorator
com.ibm.dse.base.FixedLength
This class ensures that a String has a specified length. To do this, it may truncate long Strings or add characters to theString until it has the length determined by the length attribute.
Field Summary | |
---|---|
int |
justify
|
int |
length
|
java.lang.String |
noEmpty
|
char |
padCharacter
|
Fields inherited from class com.ibm.dse.base.FormatDecorator |
---|
decorated |
Fields inherited from class com.ibm.dse.base.FormatElement |
---|
dataElementName, externalizer, name |
Constructor Summary | |
---|---|
FixedLength()
This is the default constructor used to create a FixedLength object. |
|
FixedLength(java.lang.String aName)
This is the constructor used by the Externalizer to create a FixedLength object. |
Method Summary | |
---|---|
java.lang.String |
addDecoration(java.lang.String aString)
Adjusts the length of the String to the length specified by the length attribute. |
java.lang.String[] |
extract(java.lang.String aString)
Extracts (strips) the substring corresponding to the format element from the input String and returns it and the remaining String as the elements of an array. |
int |
getJustify()
Returns the value of justify. |
int |
getLength()
Returns the value of the length attribute. |
java.lang.String |
getNoEmpty()
Returns the value of noEmpty. |
char |
getPadCharacter()
Returns the value of padCharacter. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a FixedLength object using the supplied Tag. |
java.lang.String |
removeDecoration(java.lang.String aString)
Removes the padding characters from the input String. |
void |
setJustify(int anInteger)
Sets the value of justify. |
void |
setLength(int anInteger)
Sets the value of length. |
void |
setNoEmpty(java.lang.String aString)
Sets the value of noEmpty. |
void |
setPadCharacter(char aCharacter)
Sets the value of padCharacter. |
Vector |
toStrings()
Returns a Vector containing a visual representation of the fixed length decorator. |
Methods inherited from class com.ibm.dse.base.FormatDecorator |
---|
format, format, getDataElementName, getDecorated, getName, isConstant, isItConstant, reinitialize, rootDecorated, rootDecorator, setDecorated, toString, unformat, unformat |
Methods inherited from class com.ibm.dse.base.FormatElement |
---|
exceptionInfo, externalizer, format, getExternalizer, getTagName, isCacheable, readExternal, readExternal, readObject, removeExternal, 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 |
Field Detail |
public int length
public int justify
public char padCharacter
public java.lang.String noEmpty
Constructor Detail |
public FixedLength()
public FixedLength(java.lang.String aName) throws java.io.IOException
aName
- java.lang.StringMethod Detail |
public java.lang.String addDecoration(java.lang.String aString)
addDecoration
in class FormatDecorator
aString
- String
public java.lang.String[] extract(java.lang.String aString) throws DSEInvalidArgumentException
extract
in class FormatDecorator
aString
- String
DSEInvalidArgumentException
public int getJustify()
public int getLength()
public java.lang.String getNoEmpty()
public char getPadCharacter()
public java.lang.Object initializeFrom(Tag aTag)
initializeFrom
in interface Externalizable
initializeFrom
in class FormatElement
aTag
- com.ibm.dse.base.Tag
public java.lang.String removeDecoration(java.lang.String aString) throws DSEInvalidArgumentException
removeDecoration
in class FormatDecorator
aString
- String
DSEInvalidArgumentException
public void setJustify(int anInteger)
anInteger
- java.lang.Integerpublic void setLength(int anInteger)
anInteger
- java.lang.Integerpublic void setNoEmpty(java.lang.String aString)
aString
- java.lang.Stringpublic void setPadCharacter(char aCharacter)
aCharacter
- java.lang.Characterpublic Vector toStrings()
toStrings
in interface Externalizable
toStrings
in class FormatDecorator
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |