Class Converters


  • public class Converters
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      static java.lang.Integer toInteger​(java.lang.String value)
      Convert a string to an integer allowing multiple formats.
      static java.util.stream.IntStream toIntStream​(java.lang.String values)
      Supports entry of values in ranges or comma-separated lists and combinations thereof.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 $ or 0x prefix.
      • 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-n where m
        • Distinct values: a,b,c,d.
        • Single value: x
        • Combination: m-n;a,b,c,d;x.