
delight.functional.collections.CollectionsUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of delight-functional Show documentation
Show all versions of delight-functional Show documentation
Utilities for functional-style Java applications.
The newest version!
package delight.functional.collections;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@SuppressWarnings("all")
public final class CollectionsUtils {
public static final boolean isMapComplete(final Map map, final int size) {
for (int i = 0; (i < size); i++) {
GPOutput _get = map.get(Integer.valueOf(i));
boolean _tripleEquals = (_get == null);
if (_tripleEquals) {
return false;
}
}
return true;
}
public static final List toOrderedList(final Map map) {
int _size = map.size();
final List localResponses = new ArrayList(_size);
for (int i = 0; (i < map.size()); i++) {
{
final GOutput rr = map.get(Integer.valueOf(i));
if ((!(rr != null))) {
}
localResponses.add(rr);
}
}
return localResponses;
}
/**
* Flattens the provided list into a single list.
* @param lists
* @return
*/
public static final List flatten(final List> lists) {
int size = 0;
for (final List list : lists) {
int _size = size;
int _size_1 = list.size();
size = (_size + _size_1);
}
final List res = new ArrayList(size);
for (final List list_1 : lists) {
res.addAll(list_1);
}
return res;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy