[New] Added stream() to MapOf* classes
This commit is contained in:
parent
48e4fad9d0
commit
844bddeefc
|
@ -172,6 +172,10 @@ public class MapOfLists<T, U> {
|
|||
return this.mapOfLists.values().stream().flatMap(Collection::stream);
|
||||
}
|
||||
|
||||
public Stream<Entry<T, List<U>>> stream() {
|
||||
return this.mapOfLists.entrySet().stream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
|
|
|
@ -190,6 +190,10 @@ public class MapOfSets<T, U> {
|
|||
return this.mapOfSets.values().stream().flatMap(Collection::stream);
|
||||
}
|
||||
|
||||
public Stream<Entry<T, Set<U>>> stream() {
|
||||
return this.mapOfSets.entrySet().stream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
|
|
Loading…
Reference in New Issue