-bottom

net.sf.csv4j
Interface Tokenizer<E>

Type Parameters:
E - type of tokens
All Known Implementing Classes:
CSVTokenizer

public interface Tokenizer<E>

Defines a generic StringTokenizer-style interface.

Since:
1.0
Author:
Shawn Boyce
See Also:
StringTokenizer

Method Summary
 int countTokens()
          Indicates how many tokens are left.
 boolean hasMoreTokens()
          Indicates if more tokens are available.
 E nextToken()
          Returns the next token.
 

Method Detail

hasMoreTokens

boolean hasMoreTokens()
Indicates if more tokens are available.

Returns:
true if more tokens; false if not

nextToken

E nextToken()
Returns the next token.

Returns:
next token string
Throws:
NoSuchElementException - if no more tokens available

countTokens

int countTokens()
Indicates how many tokens are left. Note the value returned is not constant; calls to nextToken() will cause the count to reduce.

Returns:
number of tokens left

-bottom