private void parseCircle(String circle) {
        int endof = circle.indexOf(')');
        if (endof == -1)
            throw new IllegalArgumentException("Illegal location syntax: " + circle);
        String circlePart = circle.substring(1,endof);
        StringTokenizer tokens = new StringTokenizer(circlePart, ",");
        setDimensions(Integer.parseInt(tokens.nextToken()));
        this.x = Integer.parseInt(tokens.nextToken());
        this.y = Integer.parseInt(tokens.nextToken());
        this.r = Integer.parseInt(tokens.nextToken());
        Integer.parseInt(tokens.nextToken()); // was "tableId"
        Integer.parseInt(tokens.nextToken()); // was "scale"
        Integer.parseInt(tokens.nextToken()); // was "replace"
        if (tokens.hasMoreTokens()) {
            String aspectToken = tokens.nextToken();
            if (aspectToken.equalsIgnoreCase("CalcLatLon")) {
                adjustAspect();
            } else {
                try {
                    aspect = Long.parseLong(aspectToken);
                } catch (NumberFormatException nfe) {
                    throw new IllegalArgumentException("Aspect "+aspectToken+" for location must be an integer or " +
                                                       "'CalcLatLon' for automatic aspect calculation.", nfe);
                }
                if (aspect > 4294967295L || aspect < 0)
                    throw new IllegalArgumentException("Aspect " + aspect + " for location parameter must be " +
                                                       "less than 4294967296 (2^32)");
            }
        }
        renderCircle = true;
        String theRest = circle.substring(endof+1).trim();
        if (theRest.length() > 5 && theRest.charAt(0) == '[')
            parseRectangle(theRest);
    }
Location data for a geographical query.
This is mutable and clonable. It's identifty is decided by its content.

@author Steinar Knutsen
@author arnej27959
container-search/src/main/java/com/yahoo/prelude/Location.java