Package rma.util

Class PowerfulTokenizer

java.lang.Object
rma.util.PowerfulTokenizer
All Implemented Interfaces:
Enumeration

public class PowerfulTokenizer extends Object implements Enumeration
  • Constructor Details

    • PowerfulTokenizer

      public PowerfulTokenizer(String str, String sep)
      Constructor
      Parameters:
      str - the input string
      sep - the delimiter string
    • PowerfulTokenizer

      public PowerfulTokenizer(String str, String sep, boolean bIncludeDelim)
      Constructor
      Parameters:
      str - the input string
      sep - the delimiter string
      bIncludeDelim - if true, include delimiters as tokens
  • Method Details

    • setTrimTokens

      public void setTrimTokens(boolean b)
    • nextToken

      public String nextToken()
      Returns the next token from the input string.
      Returns:
      String the current token from the input string.
    • hasMoreTokens

      public boolean hasMoreTokens()
      Checks whether any token is left in the input string
      Returns:
      boolean true, if any token is left
    • hasMoreElements

      public boolean hasMoreElements()
      Checks whether any token is left in the input string
      Specified by:
      hasMoreElements in interface Enumeration
      Returns:
      boolean true, if any token is left
    • nextElement

      public Object nextElement()
      Returns the next token from the input string.
      Specified by:
      nextElement in interface Enumeration
      Returns:
      Object the current token from the input string.
    • countTokens

      public int countTokens()
      Total number of tokens present in the input string
      Returns:
      int total number of tokens
    • main

      public static void main(String[] args)