|
JOELib Computational Chemistry Package |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcformat.ScanfFormat
Format object for scanning input in the same way as the C scanf methodName.
A scanf style format string is specified in the constructor. Once instantiated, objects of this class may be passed as arguments to the scan methods of the ScanfReader class.
ScanfReader| Constructor Summary | |
ScanfFormat(String fmt)
Constructs a ScanfFormat class from a format string. |
|
| Method Summary | |
void |
set(String fmt)
Sets the contents of the object according to the information provided in the format string. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ScanfFormat(String fmt)
fmt - Format string
IllegalArgumentException - Malformed format stringScanfReader| Method Detail |
public void set(String fmt)
The format string describes what input to expect for a ScanfReader, and its form closely matches that for the C scanf methodName, expect that multiple conversions cannot be specified.
A conversion sequence is introduced by the '%' character; valid conversion sequences are described below. Other characters may appear in the format string. A white space character requests a match of any amount of white space, including none. Other characters request an exact match of themselves. The character sequence "%%" requests a match of the '%' character.
The '%' character introducing a conversion sequence may be followed by an unsigned decimal integer indicating the field width, which is the maximum number of characters used for a particular conversion. Field widths must be greater than 0.
The optional field width is followed by one of the following conversion characters, which specifies the primitive type to be scanned:
fmt - Format string
IllegalArgumentException - Malformed format stringScanfReader
|
JOELib Computational Chemistry Package Comments and Questions? mail to J.K.Wegner |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||