Class Converters
- java.lang.Object
-
- io.github.applecommander.bastools.api.utils.Converters
-
public class Converters extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.BooleantoBoolean(java.lang.String value)Convert a string to a boolean value allowing for "true" or "yes" to evaluate to Boolean.TRUE.static java.lang.IntegertoInteger(java.lang.String value)Convert a string to an integer allowing multiple formats.static java.util.stream.IntStreamtoIntStream(java.lang.String values)Supports entry of values in ranges or comma-separated lists and combinations thereof.
-
-
-
Method Detail
-
toInteger
public static java.lang.Integer toInteger(java.lang.String value)
Convert a string to an integer allowing multiple formats. Normal decimal, or hexadecimal with a$or0xprefix.
-
toBoolean
public static java.lang.Boolean toBoolean(java.lang.String value)
Convert a string to a boolean value allowing for "true" or "yes" to evaluate to Boolean.TRUE.
-
toIntStream
public static java.util.stream.IntStream toIntStream(java.lang.String values)
Supports entry of values in ranges or comma-separated lists and combinations thereof.- Range:
m-nwhere m- Distinct values:
a,b,c,d.- Single value:
x- Combination:
m-n;a,b,c,d;x. - Distinct values:
- Range:
-
-