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

org.eclipse.collections.impl.factory.Iterables Maven / Gradle / Ivy

There is a newer version: 12.0.0.M3
Show newest version
/*
 * Copyright (c) 2015 Goldman Sachs.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Eclipse Distribution License v. 1.0 which accompany this distribution.
 * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 * and the Eclipse Distribution License is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 */

package org.eclipse.collections.impl.factory;

import java.util.Comparator;

import org.eclipse.collections.api.bag.ImmutableBag;
import org.eclipse.collections.api.bag.MutableBag;
import org.eclipse.collections.api.list.ImmutableList;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.ImmutableMap;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.map.sorted.ImmutableSortedMap;
import org.eclipse.collections.api.map.sorted.MutableSortedMap;
import org.eclipse.collections.api.set.ImmutableSet;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.set.sorted.ImmutableSortedSet;
import org.eclipse.collections.api.set.sorted.MutableSortedSet;

public final class Iterables
{
    private Iterables()
    {
        throw new AssertionError("Suppress default constructor for noninstantiability");
    }

    public static  MutableList mList()
    {
        return Lists.mutable.empty();
    }

    public static  MutableList mList(T... elements)
    {
        return Lists.mutable.with(elements);
    }

    public static  MutableSet mSet()
    {
        return Sets.mutable.empty();
    }

    public static  MutableSet mSet(T... elements)
    {
        return Sets.mutable.with(elements);
    }

    public static  MutableBag mBag()
    {
        return Bags.mutable.empty();
    }

    public static  MutableBag mBag(T... elements)
    {
        return Bags.mutable.with(elements);
    }

    public static  MutableMap mMap()
    {
        return Maps.mutable.empty();
    }

    public static  MutableMap mMap(K key, V value)
    {
        return Maps.mutable.with(key, value);
    }

    public static  MutableMap mMap(K key1, V value1, K key2, V value2)
    {
        return Maps.mutable.with(key1, value1, key2, value2);
    }

    public static  MutableMap mMap(K key1, V value1, K key2, V value2, K key3, V value3)
    {
        return Maps.mutable.with(key1, value1, key2, value2, key3, value3);
    }

    public static  MutableMap mMap(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
    {
        return Maps.mutable.with(key1, value1, key2, value2, key3, value3, key4, value4);
    }

    public static  MutableSortedSet mSortedSet()
    {
        return SortedSets.mutable.empty();
    }

    public static  MutableSortedSet mSortedSet(T... elements)
    {
        return SortedSets.mutable.with(elements);
    }

    public static  MutableSortedSet mSortedSet(Comparator comparator)
    {
        return SortedSets.mutable.with(comparator);
    }

    public static  MutableSortedSet mSortedSet(Comparator comparator, T... elements)
    {
        return SortedSets.mutable.with(comparator, elements);
    }

    public static  MutableSortedMap mSortedMap()
    {
        return SortedMaps.mutable.empty();
    }

    public static  MutableSortedMap mSortedMap(K key, V value)
    {
        return SortedMaps.mutable.with(key, value);
    }

    public static  MutableSortedMap mSortedMap(K key1, V value1, K key2, V value2)
    {
        return SortedMaps.mutable.with(key1, value1, key2, value2);
    }

    public static  MutableSortedMap mSortedMap(K key1, V value1, K key2, V value2, K key3, V value3)
    {
        return SortedMaps.mutable.with(key1, value1, key2, value2, key3, value3);
    }

    public static  MutableSortedMap mSortedMap(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
    {
        return SortedMaps.mutable.with(key1, value1, key2, value2, key3, value3, key4, value4);
    }

    public static  MutableSortedMap mSortedMap(Comparator comparator)
    {
        return SortedMaps.mutable.with(comparator);
    }

    public static  MutableSortedMap mSortedMap(Comparator comparator, K key, V value)
    {
        return SortedMaps.mutable.with(comparator, key, value);
    }

    public static  MutableSortedMap mSortedMap(
            Comparator comparator,
            K key1, V value1,
            K key2, V value2)
    {
        return SortedMaps.mutable.with(comparator, key1, value1, key2, value2);
    }

    public static  MutableSortedMap mSortedMap(
            Comparator comparator,
            K key1, V value1,
            K key2, V value2,
            K key3, V value3)
    {
        return SortedMaps.mutable.with(comparator, key1, value1, key2, value2, key3, value3);
    }

    public static  MutableSortedMap mSortedMap(
            Comparator comparator,
            K key1, V value1,
            K key2, V value2,
            K key3, V value3,
            K key4, V value4)
    {
        return SortedMaps.mutable.with(comparator, key1, value1, key2, value2, key3, value3, key4, value4);
    }

    public static  ImmutableList iList()
    {
        return Lists.immutable.empty();
    }

    public static  ImmutableList iList(T one)
    {
        return Lists.immutable.with(one);
    }

    public static  ImmutableList iList(T one, T two)
    {
        return Lists.immutable.with(one, two);
    }

    public static  ImmutableList iList(T one, T two, T three)
    {
        return Lists.immutable.with(one, two, three);
    }

    public static  ImmutableList iList(T one, T two, T three, T four)
    {
        return Lists.immutable.with(one, two, three, four);
    }

    public static  ImmutableList iList(T one, T two, T three, T four, T five)
    {
        return Lists.immutable.with(one, two, three, four, five);
    }

    public static  ImmutableList iList(T one, T two, T three, T four, T five, T six)
    {
        return Lists.immutable.with(one, two, three, four, five, six);
    }

    public static  ImmutableList iList(T one, T two, T three, T four, T five, T six, T seven)
    {
        return Lists.immutable.with(one, two, three, four, five, six, seven);
    }

    public static  ImmutableList iList(T one, T two, T three, T four, T five, T six, T seven, T eight)
    {
        return Lists.immutable.with(one, two, three, four, five, six, seven, eight);
    }

    public static  ImmutableList iList(T one, T two, T three, T four, T five, T six, T seven, T eight, T nine)
    {
        return Lists.immutable.with(one, two, three, four, five, six, seven, eight, nine);
    }

    public static  ImmutableList iList(T one, T two, T three, T four, T five, T six, T seven, T eight, T nine, T ten)
    {
        return Lists.immutable.with(one, two, three, four, five, six, seven, eight, nine, ten);
    }

    public static  ImmutableList iList(T... elements)
    {
        return Lists.immutable.with(elements);
    }

    public static  ImmutableSet iSet()
    {
        return Sets.immutable.empty();
    }

    public static  ImmutableSet iSet(T one)
    {
        return Sets.immutable.with(one);
    }

    public static  ImmutableSet iSet(T one, T two)
    {
        return Sets.immutable.with(one, two);
    }

    public static  ImmutableSet iSet(T one, T two, T three)
    {
        return Sets.immutable.with(one, two, three);
    }

    public static  ImmutableSet iSet(T one, T two, T three, T four)
    {
        return Sets.immutable.with(one, two, three, four);
    }

    public static  ImmutableSet iSet(T... elements)
    {
        return Sets.immutable.with(elements);
    }

    public static  ImmutableBag iBag()
    {
        return Bags.immutable.empty();
    }

    public static  ImmutableBag iBag(T one)
    {
        return Bags.immutable.with(one);
    }

    public static  ImmutableBag iBag(T... elements)
    {
        return Bags.immutable.with(elements);
    }

    public static  ImmutableMap iMap()
    {
        return Maps.immutable.empty();
    }

    public static  ImmutableMap iMap(K key, V value)
    {
        return Maps.immutable.with(key, value);
    }

    public static  ImmutableMap iMap(K key1, V value1, K key2, V value2)
    {
        return Maps.immutable.with(key1, value1, key2, value2);
    }

    public static  ImmutableMap iMap(K key1, V value1, K key2, V value2, K key3, V value3)
    {
        return Maps.immutable.with(key1, value1, key2, value2, key3, value3);
    }

    public static  ImmutableMap iMap(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
    {
        return Maps.immutable.with(key1, value1, key2, value2, key3, value3, key4, value4);
    }

    public static  ImmutableSortedSet iSortedSet()
    {
        return SortedSets.immutable.empty();
    }

    public static  ImmutableSortedSet iSortedSet(T... elements)
    {
        return SortedSets.immutable.with(elements);
    }

    public static  ImmutableSortedSet iSortedSet(Comparator comparator)
    {
        return SortedSets.immutable.with(comparator);
    }

    public static  ImmutableSortedSet iSortedSet(Comparator comparator, T... elements)
    {
        return SortedSets.immutable.with(comparator, elements);
    }

    public static  ImmutableSortedMap iSortedMap()
    {
        return SortedMaps.immutable.empty();
    }

    public static  ImmutableSortedMap iSortedMap(K key, V value)
    {
        return SortedMaps.immutable.with(key, value);
    }

    public static  ImmutableSortedMap iSortedMap(K key1, V value1, K key2, V value2)
    {
        return SortedMaps.immutable.with(key1, value1, key2, value2);
    }

    public static  ImmutableSortedMap iSortedMap(K key1, V value1, K key2, V value2, K key3, V value3)
    {
        return SortedMaps.immutable.with(key1, value1, key2, value2, key3, value3);
    }

    public static  ImmutableSortedMap iSortedMap(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
    {
        return SortedMaps.immutable.with(key1, value1, key2, value2, key3, value3, key4, value4);
    }

    public static  ImmutableSortedMap iSortedMap(Comparator comparator)
    {
        return SortedMaps.immutable.with(comparator);
    }

    public static  ImmutableSortedMap iSortedMap(Comparator comparator, K key, V value)
    {
        return SortedMaps.immutable.with(comparator, key, value);
    }

    public static  ImmutableSortedMap iSortedMap(
            Comparator comparator,
            K key1, V value1,
            K key2, V value2)
    {
        return SortedMaps.immutable.with(comparator, key1, value1, key2, value2);
    }

    public static  ImmutableSortedMap iSortedMap(
            Comparator comparator,
            K key1, V value1,
            K key2, V value2,
            K key3, V value3)
    {
        return SortedMaps.immutable.with(comparator, key1, value1, key2, value2, key3, value3);
    }

    public static  ImmutableSortedMap iSortedMap(
            Comparator comparator,
            K key1, V value1,
            K key2, V value2,
            K key3, V value3,
            K key4, V value4)
    {
        return SortedMaps.immutable.with(comparator, key1, value1, key2, value2, key3, value3, key4, value4);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy