
org.javafunk.funk.Iterables Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of funk-core Show documentation
Show all versions of funk-core Show documentation
Functional utilities for Java: core APIs
The newest version!
/*
* Copyright (C) 2011-Present Funk committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.javafunk.funk;
import com.google.common.collect.Multiset;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import static org.javafunk.funk.Literals.*;
public class Iterables {
private Iterables() {}
public static Iterable concat(Iterable extends Iterable extends T>> iterables) {
return com.google.common.collect.Iterables.concat(iterables);
}
public static List asList(Iterable extends T> iterable) {
return listFrom(iterable);
}
public static Set asSet(Iterable extends T> iterable) {
return setFrom(iterable);
}
public static Multiset asMultiset(Iterable extends T> iterable) {
return multisetFrom(iterable);
}
public static Collection materialize(Iterable extends T> iterable) {
return collectionFrom(iterable);
}
public static Iterable empty() {
return iterable();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy