Package edu.hm.hafner.util
Class IntegerParser
- java.lang.Object
-
- edu.hm.hafner.util.IntegerParser
-
public final class IntegerParser extends Object
Parses integers from string values.- Author:
- Ullrich Hafner
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intparseInt(String number)Converts a number (represented by the specified String) to an integer value.
-
-
-
Method Detail
-
parseInt
public static int parseInt(@CheckForNull String number)Converts a number (represented by the specified String) to an integer value. If the string is not a valid number, then 0 is returned. This method does not throw exceptions if the value is invalid.- Parameters:
number- the line number (as a string)- Returns:
- the converted number
- See Also:
Integer.parseInt(String)
-
-