MCPcopy Create free account
hub / github.com/antlr/codebuff / removeOnlySet

Method removeOnlySet

corpus/java/training/guava/collect/Maps.java:1017–1034  ·  view source on GitHub ↗
(final Set<E> set)

Source from the content-addressed store, hash-verified

1015 }
1016
1017 private static <E> Set<E> removeOnlySet(final Set<E> set) {
1018 return new ForwardingSet<E>() {
1019 @Override
1020 protected Set<E> delegate() {
1021 return set;
1022 }
1023
1024 @Override
1025 public boolean add(E element) {
1026 throw new UnsupportedOperationException();
1027 }
1028
1029 @Override
1030 public boolean addAll(Collection<? extends E> es) {
1031 throw new UnsupportedOperationException();
1032 }
1033 };
1034 }
1035
1036 private static <E> SortedSet<E> removeOnlySortedSet(final SortedSet<E> set) {
1037 return new ForwardingSortedSet<E>() {

Callers 1

createKeySetMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected