|
Service Activator Toolkit
Version 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The ITokenizer interface defines the API for an optimized
String tokenizer class. An instance of ITokenizer
can be created using the FactoryUtility singleton.
String value = ... FactoryUtility utility = FactoryUtility.getInstance(); ITokenizer tokenizer = utility.createTokenizer(value);This API is designed such that it should be easy to use, especially if you are familiar with the
Enumeration interface or the
StringTokenizer class.
while (tokenizer.hasMoreTokens() == true) {
String token = tokenizer.nextToken();
...
}
The need for this abstraction was identified after measuring the performance
of an OSGi application built using SAT and identifying that using the
standard Java class StringTokenizer was taking an excessive
amount of time.
FactoryUtility| Method Summary | |
boolean |
hasMoreTokens()
Query whether there are more tokens. |
String |
nextToken()
Get the next token. |
| Methods inherited from interface java.util.Enumeration |
hasMoreElements, nextElement |
| Method Detail |
public boolean hasMoreTokens()
booleanpublic String nextToken()
String
|
Service Activator Toolkit
Version 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2001, 2007 IBM Corporation and others. All Rights Reserved.