Package de.stefanfrings.utils
Class BooleanParser
java.lang.Object
de.stefanfrings.utils.BooleanParser
Parser for strings that represent boolean values.
- Author:
- Stefan Frings, http://stefanfrings.de/javautils
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BooleanParser
public BooleanParser()
-
-
Method Details
-
parse
Parse a string to a boolean value.Valid strings, not case-sensitive:
- true, yes, on, 1, y
- false, no, off, 0, n
- Parameters:
s- The source string- Returns:
- The boolean value of that string
- Throws:
NumberFormatException- If the string has an invalid content.
-