org.h2.mvstore.rtree

## Class SpatialKey

- java.lang.Object
- - org.h2.mvstore.rtree.SpatialKey

    public class SpatialKey
    extends java.lang.Object

A unique spatial key.

### Constructor Summary

Constructors
Constructor and Description
`SpatialKey(long id, float... minMax)` Create a new key.

### Method Summary

Methods
`boolean` `equals(java.lang.Object other)`
`boolean` `equalsIgnoringId(SpatialKey o)` Check whether two objects are equals, but do not compare the id fields.
`long` `getId()`
`int` `hashCode()`
`boolean` `isNull()`
`float` `max(int dim)` Get the maximum value for the given dimension.
`float` `min(int dim)` Get the minimum value for the given dimension.
`void` `setMax(int dim, float x)` Set the maximum value for the given dimension.
`void` `setMin(int dim, float x)` Set the minimum value for the given dimension.
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SpatialKey

    public SpatialKey(long id,
              float... minMax)

Create a new key.

Parameters:
  `id` - the id
  `minMax` - min x, max x, min y, max y, and so on

### Method Detail

#### min

    public float min(int dim)

Get the minimum value for the given dimension.

Parameters:
  `dim` - the dimension
Returns:
  the value

#### setMin

    public void setMin(int dim,
              float x)

Set the minimum value for the given dimension.

Parameters:
  `dim` - the dimension
  `x` - the value

#### max

    public float max(int dim)

Get the maximum value for the given dimension.

Parameters:
  `dim` - the dimension
Returns:
  the value

#### setMax

    public void setMax(int dim,
              float x)

Set the maximum value for the given dimension.

Parameters:
  `dim` - the dimension
  `x` - the value

#### getId

    public long getId()

#### isNull

    public boolean isNull()

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### equals

    public boolean equals(java.lang.Object other)

Overrides:
  `equals` in class `java.lang.Object`

#### equalsIgnoringId

    public boolean equalsIgnoringId(SpatialKey o)

Check whether two objects are equals, but do not compare the id fields.

Parameters:
  `o` - the other key
Returns:
  true if the contents are the same