|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.biscotti.collect.Collections4
public final class Collections4
Static utility methods which operate on or return Collections and Maps.
Copied from http://biscotti.googlecode.com/svn-history/r193/trunk/src/com/googlecode/biscotti/collect/Collections4.java, 26 jan 2011, because the lib is not published in maven yet. A few modifications for sticking to conventions of this project. Deleted some unneeded parts.
| Constructor Summary | |
|---|---|
Collections4()
|
|
| Method Summary | ||
|---|---|---|
static
|
unmodifiable(NavigableMap<K,? extends V> nm)
Returns an unmodifiable view of the specified NavigableMap. |
|
static
|
unmodifiable(NavigableSet<E> ns)
Returns an unmodifiable view of the specified NavigableSet. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Collections4()
| Method Detail |
|---|
public static <E> NavigableSet<E> unmodifiable(NavigableSet<E> ns)
NavigableSet. This method allows modules to provide users
with "read-only" access to internal navigable sets. Query operations on the returned set "read through" to the
specified set. Attempts to modify the returned navigable set, whether direct, via its iterator, or via its
subSet, headSet, or tailSet views, result in an UnsupportedOperationException.
The returned navigable set will be serializable if the specified set is serializable.
E - element typens - the navigable set for which an unmodifiable view is to be returned
public static <K,V> NavigableMap<K,V> unmodifiable(NavigableMap<K,? extends V> nm)
NavigableMap. This method allows modules to provide users
with "read-only" access to internal navigable maps. Query operations on the returned map "read through" to the
specified map. Attempts to modify the returned navigable map, whether direct, via its collection views, or via
its subMap, headMap, or tailMap views, result in an UnsupportedOperationException
.
The returned navigable map will be serializable if the specified map is serializable.
K - key typeV - value typenm - the navigable map for which an unmodifiable view is to be returned
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||