Class SimpleStringTokenizer

  • All Implemented Interfaces:
    java.lang.Iterable<java.lang.String>

    public final class SimpleStringTokenizer
    extends java.lang.Object
    implements java.lang.Iterable<java.lang.String>
    A simple way of splitting up a String.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleStringTokenizer​(java.lang.String subject, char delim)
      Gets the different part of a string which are separated by the delimiter.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<java.lang.String> iterator()  
      static java.lang.String[] split​(java.lang.String subject, char delim)
      Splits the string at the delimiter character.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • SimpleStringTokenizer

        public SimpleStringTokenizer​(java.lang.String subject,
                                     char delim)
        Gets the different part of a string which are separated by the delimiter.
        Parameters:
        subject - the string
        delim - the character to split at
    • Method Detail

      • iterator

        public java.util.Iterator<java.lang.String> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.String>
      • split

        public static java.lang.String[] split​(java.lang.String subject,
                                               char delim)
        Splits the string at the delimiter character.
        Parameters:
        subject - the string to split
        delim - the character to split at
        Returns:
        the string split multiple times at the delimiter, trimmed of spaces