public void setDimensions(int d) {
        if (hasDimensions() && dimensions != d)
            throw new IllegalStateException("already has dimensions " + dimensions + ", cannot change to " + d);
        if (d == 2)
            dimensions = d;
        else
            throw new IllegalArgumentException("Illegal location, dimensions must be 2, but was: " + d);
    }
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