com.lonniepryor.blues.util
Class TokenizedStrings.Builder

java.lang.Object
  |
  +--com.lonniepryor.blues.util.TokenizedStrings.Builder
Enclosing class:
TokenizedStrings

public abstract static class TokenizedStrings.Builder
extends java.lang.Object

Helper class for sequentially constructing the elements of a common TokenizedStrings specification.

Version:
$Revision: 1.1 $
Author:
Lonnie Pryor

Constructor Summary
TokenizedStrings.Builder()
           
 
Method Summary
 Strings endingWithAnyTokens(char delimeter)
          Returns a Strings specification that will allow any number of tokens at the end of canidate strings.
 Strings endingWithAtLeastNumTokens(int minTokens, char delimeter)
          Returns a Strings specification that will require at least the supplied number of tokens at the end of canidate strings.
 Strings endingWithToken(java.lang.String stringPattern, char delimeter)
          Returns a Strings specification that will require a token satisfying the supplied pattern at the end of canidate strings.
 Strings endingWithToken(Strings specification, char delimeter)
          Returns a Strings specification that will require a token satisfying the supplied specification at the end of canidate strings.
 TokenizedStrings.Builder followedByAnyTokens()
          Returns a Builder whose resulting Strings specification will allow any number of tokens at this point in canidate strings.
 TokenizedStrings.Builder followedByAtLeastNumTokens(int minTokens)
          Returns a Builder whose resulting Strings specification will require at least the supplied number of tokens at this point in canidate strings.
 TokenizedStrings.Builder followedByToken(java.lang.String stringPattern)
          Returns a Builder whose resulting Strings specification will require the supplied pattern at this point in canidate strings.
 TokenizedStrings.Builder followedByToken(Strings specification)
          Returns a Builder whose resulting Strings specification will require the supplied specification at this point in canidate strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenizedStrings.Builder

public TokenizedStrings.Builder()
Method Detail

followedByAnyTokens

public TokenizedStrings.Builder followedByAnyTokens()
Returns a Builder whose resulting Strings specification will allow any number of tokens at this point in canidate strings.

Returns:
A Builder whose resulting Strings specification will allow any number of tokens at this point in canidate strings.

followedByAtLeastNumTokens

public TokenizedStrings.Builder followedByAtLeastNumTokens(int minTokens)
Returns a Builder whose resulting Strings specification will require at least the supplied number of tokens at this point in canidate strings.

Parameters:
minTokens - The minimum number of tokens to require.
Returns:
A Builder whose resulting Strings specification will require at least the supplied number of tokens at this point in canidate strings.

followedByToken

public TokenizedStrings.Builder followedByToken(java.lang.String stringPattern)
Returns a Builder whose resulting Strings specification will require the supplied pattern at this point in canidate strings.

Parameters:
stringPattern - The pattern required at this point in canidates.
Returns:
A Builder whose resulting Strings specification will require the supplied pattern at this point in canidate strings.
See Also:
Strings.parse(String)

followedByToken

public TokenizedStrings.Builder followedByToken(Strings specification)
Returns a Builder whose resulting Strings specification will require the supplied specification at this point in canidate strings.

Parameters:
specification - The specification required at this point in canidates.
Returns:
A Builder whose resulting Strings specification will require the supplied specification at this point in canidate strings.

endingWithAnyTokens

public Strings endingWithAnyTokens(char delimeter)
Returns a Strings specification that will allow any number of tokens at the end of canidate strings.

Parameters:
delimeter - The token delimeter.
Returns:
A Strings specification that will allow any number of tokens at the end of canidate strings.

endingWithAtLeastNumTokens

public Strings endingWithAtLeastNumTokens(int minTokens,
                                          char delimeter)
Returns a Strings specification that will require at least the supplied number of tokens at the end of canidate strings.

Parameters:
minTokens - The minimum number of tokens to require at the end of canidates.
delimeter - The token delimeter.
Returns:
A Strings specification that will require at least the supplied number of tokens at the end of canidate strings.

endingWithToken

public Strings endingWithToken(java.lang.String stringPattern,
                               char delimeter)
Returns a Strings specification that will require a token satisfying the supplied pattern at the end of canidate strings.

Parameters:
stringPattern - The pattern required at the end of canidates.
delimeter - The token delimeter.
Returns:
A Strings specification that will require a token satisfying the supplied pattern at the end of canidate strings.
See Also:
Strings.parse(String)

endingWithToken

public Strings endingWithToken(Strings specification,
                               char delimeter)
Returns a Strings specification that will require a token satisfying the supplied specification at the end of canidate strings.

Parameters:
specification - The specification required at the end of canidates.
delimeter - The token delimeter.
Returns:
A Strings specification that will require a token satisfying the supplied specification at the end of canidate strings.


Copyright © 2003 Blues Framework. All Rights Reserved.