Package org.apache.maven.jxr.util
Class SimpleWordTokenizer
java.lang.Object
org.apache.maven.jxr.util.SimpleWordTokenizer
This is a small and fast word tokenizer. It has different characteristics from the normal Java tokenizer. It only
considers clear words that are only ended with spaces as strings. EX: "Flight" would be a word but "Flight()" would
not.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intGo through the list of BREAKERS and find the closes one.private static booleanisBreaker(char c) Return true if the given char is considered a breaker.static List<StringEntry> Breaks the given line into multiple tokens.private static List<StringEntry> Internal impl.static List<StringEntry> Tokenize the given line but only return those tokens that match the parameterfind.
-
Field Details
-
NONBREAKERS
-
BREAKERS
private static final char[] BREAKERS
-
-
Constructor Details
-
SimpleWordTokenizer
public SimpleWordTokenizer()
-
-
Method Details
-
tokenize
Breaks the given line into multiple tokens.- Parameters:
line- line to tokenize- Returns:
- list of tokens
-
tokenize
Tokenize the given line but only return those tokens that match the parameterfind.- Parameters:
line- line to search infind- String to match- Returns:
- list of matching tokens
-
tokenize
Internal impl. Specify the start and end. -
getStart
Go through the list of BREAKERS and find the closes one. -
isBreaker
private static boolean isBreaker(char c) Return true if the given char is considered a breaker.
-