1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
package jsr166x; |
1689 |
|
/* ---------------- Serialization -------------- */ |
1690 |
|
|
1691 |
|
/** |
1692 |
< |
* Save the state of the <tt>Map</tt> instance to a stream. |
1692 |
> |
* Saves the state of the <tt>Map</tt> instance to a stream. |
1693 |
|
* |
1694 |
|
* @serialData The key (Object) and value (Object) for each |
1695 |
|
* key-value mapping represented by the Map, followed by |
1714 |
|
} |
1715 |
|
|
1716 |
|
/** |
1717 |
< |
* Reconstitute the <tt>Map</tt> instance from a stream. |
1717 |
> |
* Reconstitutes the <tt>Map</tt> instance from a stream. |
1718 |
|
*/ |
1719 |
|
private void readObject(final java.io.ObjectInputStream s) |
1720 |
|
throws java.io.IOException, ClassNotFoundException { |
2250 |
|
* <tt>fromKey</tt> and <tt>toKey</tt> are equal, the returned sorted map |
2251 |
|
* is empty.) The returned sorted map is backed by this map, so changes |
2252 |
|
* in the returned sorted map are reflected in this map, and vice-versa. |
2253 |
< |
|
2253 |
> |
* |
2254 |
|
* @param fromKey low endpoint (inclusive) of the subMap. |
2255 |
|
* @param toKey high endpoint (exclusive) of the subMap. |
2256 |
|
* |
2305 |
|
* <tt>Comparable</tt>). |
2306 |
|
* @throws NullPointerException if <tt>fromKey</tt> is <tt>null</tt>. |
2307 |
|
*/ |
2308 |
< |
public ConcurrentNavigableMap<K,V> tailMap(K fromKey) { |
2308 |
> |
public ConcurrentNavigableMap<K,V> tailMap(K fromKey) { |
2309 |
|
if (fromKey == null) |
2310 |
|
throw new NullPointerException(); |
2311 |
|
return new ConcurrentSkipListSubMap(this, fromKey, null); |
3241 |
|
return new ConcurrentSkipListSubMap(m, least, toKey); |
3242 |
|
} |
3243 |
|
|
3244 |
< |
public ConcurrentNavigableMap<K,V> tailMap(K fromKey) { |
3244 |
> |
public ConcurrentNavigableMap<K,V> tailMap(K fromKey) { |
3245 |
|
if (fromKey == null) |
3246 |
|
throw new NullPointerException(); |
3247 |
|
if (!inOpenRange(fromKey)) |