|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.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,
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,
rootDecorated,
rootDecorator,
setDecorated,
toString,
unformat,
unformat |
Methods inherited from class com.ibm.dse.base.FormatElement |
exceptionInfo,
externalizer,
format,
getExternalizer,
getTagName,
isCacheable,
readExternal,
readExternal,
readObject,
reinitialize,
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)
aString
- Stringpublic java.lang.String[] extract(java.lang.String aString) throws DSEInvalidArgumentException
aString
- Stringpublic int getJustify()
public int getLength()
public java.lang.String getNoEmpty()
public char getPadCharacter()
public java.lang.Object initializeFrom(Tag aTag)
aTag
- com.ibm.dse.base.Tagpublic java.lang.String removeDecoration(java.lang.String aString) throws DSEInvalidArgumentException
aString
- Stringpublic 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |