[Fix] Fixed forEach() not public on MapOf* collections
This commit is contained in:
parent
d99c029433
commit
be88aaf3f2
|
@ -120,7 +120,7 @@ public class MapOfLists<T, U> {
|
|||
return this;
|
||||
}
|
||||
|
||||
List<U> getListOrDefault(T key, List<U> defaultValue) {
|
||||
public List<U> getListOrDefault(T key, List<U> defaultValue) {
|
||||
List<U> u;
|
||||
return (((u = getList(key)) != null) || containsList(key)) ? u : defaultValue;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class MapOfLists<T, 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);
|
||||
for (Map.Entry<T, List<U>> entry : this.mapOfLists.entrySet()) {
|
||||
T k;
|
||||
|
|
|
@ -165,7 +165,7 @@ public class MapOfMaps<T, U, V> {
|
|||
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;
|
||||
return (((u = getMap(key)) != null) || containsMap(key)) ? u : defaultValue;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public class MapOfMaps<T, U, V> {
|
|||
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);
|
||||
for (Map.Entry<T, Map<U, V>> entry : this.mapOfMaps.entrySet()) {
|
||||
T k;
|
||||
|
|
|
@ -120,7 +120,7 @@ public class MapOfSets<T, U> {
|
|||
return this;
|
||||
}
|
||||
|
||||
Set<U> getSetOrDefault(T key, Set<U> defaultValue) {
|
||||
public Set<U> getSetOrDefault(T key, Set<U> defaultValue) {
|
||||
Set<U> u;
|
||||
return (((u = getSet(key)) != null) || containsSet(key)) ? u : defaultValue;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class MapOfSets<T, 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);
|
||||
for (Map.Entry<T, Set<U>> entry : this.mapOfSets.entrySet()) {
|
||||
T k;
|
||||
|
|
Loading…
Reference in New Issue