Returns an unmodifiable view of the specified navigable set. 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, and attempts to modify the returned set, whether direct or via its co
(NavigableSet<E> set)
| 1489 | */ |
| 1490 | |
| 1491 | @GwtIncompatible // NavigableSet |
| 1492 | public static <E> NavigableSet<E> unmodifiableNavigableSet(NavigableSet<E> set) { |
| 1493 | if (set instanceof ImmutableSortedSet || set instanceof UnmodifiableNavigableSet) { |
| 1494 | return set; |
| 1495 | } |
| 1496 | return new UnmodifiableNavigableSet<E>(set); |
| 1497 | } |
| 1498 | |
| 1499 | @GwtIncompatible // NavigableSet |
| 1500 | static final class UnmodifiableNavigableSet<E> extends ForwardingSortedSet<E> |
no outgoing calls
no test coverage detected