All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javafunk.funk.Iterables Maven / Gradle / Ivy

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> iterables) {
        return com.google.common.collect.Iterables.concat(iterables);
    }

    public static  List asList(Iterable iterable) {
        return listFrom(iterable);
    }

    public static  Set asSet(Iterable iterable) {
        return setFrom(iterable);
    }

    public static  Multiset asMultiset(Iterable iterable) {
        return multisetFrom(iterable);
    }

    public static  Collection materialize(Iterable iterable) {
        return collectionFrom(iterable);
    }

    public static  Iterable empty() {
        return iterable();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy