[New] Added MapOf*.values()
This commit is contained in:
parent
72f77b2360
commit
99c0634b75
|
@ -39,6 +39,12 @@ public class MapOfLists<T, U> {
|
||||||
return this.mapOfLists.keySet();
|
return this.mapOfLists.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<U> values() {
|
||||||
|
List<U> values = new ArrayList<>();
|
||||||
|
forEach((t, us) -> values.addAll(us));
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
public List<U> getList(T t) {
|
public List<U> getList(T t) {
|
||||||
return this.mapOfLists.get(t);
|
return this.mapOfLists.get(t);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,12 @@ public class MapOfMaps<T, U, V> {
|
||||||
return this.mapOfMaps.keySet();
|
return this.mapOfMaps.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<V> values() {
|
||||||
|
List<V> values = new ArrayList<>();
|
||||||
|
forEach((t, us) -> values.addAll(us.values()));
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<U, V> getMap(T t) {
|
public Map<U, V> getMap(T t) {
|
||||||
return this.mapOfMaps.get(t);
|
return this.mapOfMaps.get(t);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,12 @@ public class MapOfSets<T, U> {
|
||||||
return this.mapOfSets.keySet();
|
return this.mapOfSets.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<U> values() {
|
||||||
|
List<U> values = new ArrayList<>();
|
||||||
|
forEach((t, us) -> values.addAll(us));
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
public Set<U> getSet(T t) {
|
public Set<U> getSet(T t) {
|
||||||
return this.mapOfSets.get(t);
|
return this.mapOfSets.get(t);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue