Class Tokens


  • public final class Tokens
    extends java.lang.Object
    Utility methods for dealing with tokens.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Iterable<java.lang.String> splitByComma​(java.lang.String text)
      Lazily splits the given string into whitespace-trimmed tokens, using comma as the token separator.
      static java.lang.Iterable<java.lang.String> splitByStar​(java.lang.String text)
      Lazily splits the given string into non-trimmed tokens, using star as the token separator.
      • Methods inherited from class java.lang.Object

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

      • splitByComma

        public static java.lang.Iterable<java.lang.String> splitByComma​(java.lang.String text)
        Lazily splits the given string into whitespace-trimmed tokens, using comma as the token separator.
        Parameters:
        text - The text to split into tokens
        Returns:
        Sequence of comma-separated tokens
      • splitByStar

        public static java.lang.Iterable<java.lang.String> splitByStar​(java.lang.String text)
        Lazily splits the given string into non-trimmed tokens, using star as the token separator.
        Parameters:
        text - The text to split into tokens
        Returns:
        Sequence of star-separated tokens