private static void parseSingleToken(List<PlaceRequest> places, String token) {
if(token.contains(";")) // parametrized?
{
StringTokenizer params = new StringTokenizer(token, ";");
PlaceRequest request = null;
while(params.hasMoreTokens())
{
String tok = params.nextToken();
if(tok.contains("="))
{
if(null==request) break;
// parameter
String[] parameter = tok.split("=");
request = request.with(parameter[0], parameter[1]);
}
else
{
// address
request = new PlaceRequest(tok);
}
}
// exit, either wrong token or different formatter
if(null==request)
throw new IllegalArgumentException("Illegal token: "+token);
places.add(request);
}
else
{
places.add(new PlaceRequest(token));
}
}