Class InternalUtils


  • public class InternalUtils
    extends java.lang.Object
    Utilities for internal use only.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  InternalUtils.Joiner
      A functional interface for joining Strings or Objects via Object.toString() using a pre-configured delimiter.
      static interface  InternalUtils.Splitter
      A functional interface for splitting Strings using a pre-configured regular expression.
    • Constructor Summary

      Constructors 
      Constructor Description
      InternalUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String commaJoin​(java.lang.String... strings)
      Join strings with ", " skipping nulls
      static InternalUtils.Joiner joiner​(java.lang.String delimiter)
      Return a lambda for joining Strings or Objects via Object.toString().
      static InternalUtils.Splitter splitter​(java.lang.String regex)
      Return a lambda for splitting a string into components
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InternalUtils

        public InternalUtils()
    • Method Detail

      • joiner

        public static InternalUtils.Joiner joiner​(java.lang.String delimiter)
        Return a lambda for joining Strings or Objects via Object.toString().
        Parameters:
        delimiter - The delimiter used to join the String components
        Returns:
        A Joiner (lambda) instance
      • splitter

        public static InternalUtils.Splitter splitter​(java.lang.String regex)
        Return a lambda for splitting a string into components
        Parameters:
        regex - regular expression used to split components
        Returns:
        A Splitter (lambda) instance
      • commaJoin

        public static java.lang.String commaJoin​(java.lang.String... strings)
        Join strings with ", " skipping nulls
        Parameters:
        strings - varargs strings
        Returns:
        A joined string