ceilingKey


Description:

public K ceilingKey (K key)

Returns the smallest key greater than or equal to the given key. Returns null if no such key exists.

Example:

    var map = new TreeMap<string,string> ((a, b) => {
return strcmp (a, b);
});
map.put ("a", "1");
map.put ("c", "3");
map.put ("e", "5");
assert (map.ceilingKey ("b") == "c");
assert (map.ceilingKey ("c") == "c");

Parameters:

key

the reference key.

Returns:

the ceiling key, or null if none.