|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.text.chem.RxnNameFormatV1
public final class RxnNameFormatV1
This class is a concrete implementation of RxnNameFormat.
This format considers reaction names to be String
objects.
Reaction names cannot contain any whitespace characters
(spaces, tabs, or newlines) and their length must be greater than 0.
Constructor Summary | |
---|---|
RxnNameFormatV1()
|
Method Summary | |
---|---|
java.lang.String |
format(java.lang.String reactionName)
Returns the provided reaction name after ensuring it conforms to this format. |
java.lang.String |
parse(java.lang.String reactionName)
Parses the provided string and returns its corresponding reaction name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RxnNameFormatV1()
Method Detail |
---|
public java.lang.String format(java.lang.String reactionName)
format
in interface Formatter<java.lang.String>
reactionName
- the reaction name to be checked.
java.lang.IllegalArgumentException
- if the provided
reaction name does not conform to this format.
java.lang.NullPointerException
- if the provided
string is null
.public java.lang.String parse(java.lang.String reactionName)
parse
in interface Parser<java.lang.String>
reactionName
- the string to be parsed.
FormatException
- if the provided string
is not a valid reaction name.
java.lang.NullPointerException
- if the provided string
is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |