private void parseRectangle(String rectangle) {
        int endof = rectangle.indexOf(']');
        if (endof == -1)
            throw new IllegalArgumentException("Illegal location syntax: " + rectangle);
        String rectPart = rectangle.substring(1,endof);
        StringTokenizer tokens = new StringTokenizer(rectPart, ",");
        setDimensions(Integer.parseInt(tokens.nextToken()));
        this.x1 = Integer.parseInt(tokens.nextToken());
        this.y1 = Integer.parseInt(tokens.nextToken());
        this.x2 = Integer.parseInt(tokens.nextToken());
        this.y2 = Integer.parseInt(tokens.nextToken());
        if (tokens.hasMoreTokens())
            throw new IllegalArgumentException("Illegal location syntax: " + rectangle);
        renderRectangle = true;
        String theRest = rectangle.substring(endof+1).trim();
        if (theRest.length() >= 15 && theRest.charAt(0) == '(')
            parseCircle(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