[Fix] Fixed forEach() not public on MapOf* collections

This commit is contained in:
Robert von Burg 2019-06-19 13:13:33 +02:00
parent d99c029433
commit be88aaf3f2
3 changed files with 6 additions and 6 deletions

View File

@ -120,7 +120,7 @@ public class MapOfLists<T, U> {
return this; return this;
} }
List<U> getListOrDefault(T key, List<U> defaultValue) { public List<U> getListOrDefault(T key, List<U> defaultValue) {
List<U> u; List<U> u;
return (((u = getList(key)) != null) || containsList(key)) ? u : defaultValue; return (((u = getList(key)) != null) || containsList(key)) ? u : defaultValue;
} }
@ -139,7 +139,7 @@ public class MapOfLists<T, U> {
return u; return u;
} }
void forEach(BiConsumer<? super T, ? super List<U>> action) { public void forEach(BiConsumer<? super T, ? super List<U>> action) {
Objects.requireNonNull(action); Objects.requireNonNull(action);
for (Map.Entry<T, List<U>> entry : this.mapOfLists.entrySet()) { for (Map.Entry<T, List<U>> entry : this.mapOfLists.entrySet()) {
T k; T k;

View File

@ -165,7 +165,7 @@ public class MapOfMaps<T, U, V> {
return this; return this;
} }
Map<U, V> getMapOrDefault(T key, Map<U, V> defaultValue) { public Map<U, V> getMapOrDefault(T key, Map<U, V> defaultValue) {
Map<U, V> u; Map<U, V> u;
return (((u = getMap(key)) != null) || containsMap(key)) ? u : defaultValue; return (((u = getMap(key)) != null) || containsMap(key)) ? u : defaultValue;
} }
@ -184,7 +184,7 @@ public class MapOfMaps<T, U, V> {
return u; return u;
} }
void forEach(BiConsumer<? super T, ? super Map<U, V>> action) { public void forEach(BiConsumer<? super T, ? super Map<U, V>> action) {
Objects.requireNonNull(action); Objects.requireNonNull(action);
for (Map.Entry<T, Map<U, V>> entry : this.mapOfMaps.entrySet()) { for (Map.Entry<T, Map<U, V>> entry : this.mapOfMaps.entrySet()) {
T k; T k;

View File

@ -120,7 +120,7 @@ public class MapOfSets<T, U> {
return this; return this;
} }
Set<U> getSetOrDefault(T key, Set<U> defaultValue) { public Set<U> getSetOrDefault(T key, Set<U> defaultValue) {
Set<U> u; Set<U> u;
return (((u = getSet(key)) != null) || containsSet(key)) ? u : defaultValue; return (((u = getSet(key)) != null) || containsSet(key)) ? u : defaultValue;
} }
@ -139,7 +139,7 @@ public class MapOfSets<T, U> {
return u; return u;
} }
void forEach(BiConsumer<? super T, ? super Set<U>> action) { public void forEach(BiConsumer<? super T, ? super Set<U>> action) {
Objects.requireNonNull(action); Objects.requireNonNull(action);
for (Map.Entry<T, Set<U>> entry : this.mapOfSets.entrySet()) { for (Map.Entry<T, Set<U>> entry : this.mapOfSets.entrySet()) {
T k; T k;