Hi,

What about adding a second map with a counter as a key, and the key as the
value. So there are two maps:

map 1: key: counter; value: your key
map 2: key: your key; value: your value plus the counter from map 1

Regards,
Thomas


On Sun, Apr 22, 2018 at 8:46 PM, ivan <[email protected]> wrote:

> oh? that great! do you have any sample?  Thanks
>
> I found this but can't really understand how this work :
>
> MVRTreeMap<String> r = s.openMap("data",
>         new MVRTreeMap.Builder<String>());
>
> // add two key-value pairs
> // the first value is the key id (to make the key unique)
> // then the min x, max x, min y, max y
> r.add(new SpatialKey(0, -3f, -2f, 2f, 3f), "left");
> r.add(new SpatialKey(1, 3f, 4f, 4f, 5f), "right");
>
> // iterate over the intersecting keys
> Iterator<SpatialKey> it =
>         r.findIntersectingKeys(new SpatialKey(0, 0f, 9f, 3f, 6f));
> for (SpatialKey k; it.hasNext();) {
>     k = it.next();
>     System.out.println(k + ": " + r.get(k));
> }
> s.close();
>
> On Saturday, April 21, 2018 at 7:34:10 PM UTC+8, Noel Grandin wrote:
>>
>> you can use ceiingKey(K) to match on the first part of the search key.​
>>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to