com.hp.hpl.jena.util
Class Tokenizer

java.lang.Object
  extended by com.hp.hpl.jena.util.Tokenizer

public class Tokenizer
extends Object

A tokenizer, similar to java's StringTokenizer but allows for quoted character strings which can include other separators.

Version:
$Revision: 1.1 $ on $Date: 2009-06-29 08:55:47 $
Author:
Dave Reynolds

Constructor Summary
Tokenizer(String str, String delim, String literalDelim, boolean returnDelims)
          Constructor.
 
Method Summary
 boolean hasMoreTokens()
          Test if there are more tokens which can be returned.
static void main(String[] args)
           
 String nextToken()
          Return the next token.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tokenizer

public Tokenizer(String str,
                 String delim,
                 String literalDelim,
                 boolean returnDelims)
Constructor.

Parameters:
str - the source string to be parsed
delim - The set of delimiter characters
literalDelim - Literal string delimiters
returnDelims - If true then delimiters should be returned as tokens
Method Detail

nextToken

public String nextToken()
Return the next token.

Throws:
NoSuchElementException - if there are no more tokens available

hasMoreTokens

public boolean hasMoreTokens()
Test if there are more tokens which can be returned.


main

public static void main(String[] args)


Licenced under the Apache License, Version 2.0