net.openhft.koloboke.collect.set.hash.HashFloatSets Maven / Gradle / Ivy
Show all versions of koloboke-api-jdk8 Show documentation
/*
* Copyright 2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.openhft.koloboke.collect.set.hash;
import net.openhft.koloboke.collect.set.FloatSet;
import java.util.function.Consumer;
import javax.annotation.Nonnull;
import java.util.*;
/**
* This class consists only of static factory methods to construct {@code HashFloatSet}s, and
* the default {@link HashFloatSetFactory} static provider ({@link #getDefaultFactory()}).
*
* @see HashFloatSet
*/
public final class HashFloatSets {
private static class DefaultFactoryHolder {
private static final HashFloatSetFactory defaultFactory =
ServiceLoader.load(HashFloatSetFactory.class).iterator().next();
}
/**
* Returns the default implementation of {@link HashFloatSetFactory}, to which all static methods
* in this class delegate.
*
* @return the default implementation of {@link HashFloatSetFactory}
* @throws RuntimeException if no implementations of {@link HashFloatSetFactory} are provided
*/
@Nonnull
public static HashFloatSetFactory getDefaultFactory() {
return (HashFloatSetFactory) DefaultFactoryHolder.defaultFactory;
}
/**
* Constructs a new empty mutable set of the default expected size.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet() newMutableSet()}.
*
* @return a new empty mutable set
*/
@Nonnull
public static HashFloatSet newMutableSet() {
return getDefaultFactory().newMutableSet();
}
/**
* Constructs a new empty mutable set of the given expected size.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(int) newMutableSet(expectedSize)}.
*
* @param expectedSize the expected size of the returned set
* @return a new empty mutable set of the given expected size
*/
@Nonnull
public static HashFloatSet newMutableSet(int expectedSize) {
return getDefaultFactory().newMutableSet(expectedSize);
}
/**
* Constructs a new mutable set containing the elements in the specified iterable.
*
*
*
If the specified iterable is a {@link java.util.Set}
* the {@code expectedSize} argument is ignored.
*
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterable, int) newMutableSet(elements, expectedSize)}.
*
* @param elements the iterable whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set of the elements of the specified iterable
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elements, int expectedSize) {
return getDefaultFactory().newMutableSet(elements, expectedSize);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterable, Iterable, int) newMutableSet(elems1, elems2, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2, int expectedSize) {
return getDefaultFactory().newMutableSet(elems1, elems2, expectedSize);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterable, Iterable, Iterable, int) newMutableSet(elems1, elems2, elems3, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3, int expectedSize) {
return getDefaultFactory().newMutableSet(elems1, elems2, elems3, expectedSize);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(Iterable,
* Iterable, Iterable, Iterable, int) newMutableSet(elems1, elems2, elems3, elems4, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4, int expectedSize) {
return getDefaultFactory().newMutableSet(elems1, elems2, elems3, elems4, expectedSize);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(Iterable, Iterable, Iterable,
* Iterable, Iterable, int) newMutableSet(elems1, elems2, elems3, elems4, elems5, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param elems5 the fifth source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4,
@Nonnull Iterable elems5, int expectedSize) {
return getDefaultFactory().newMutableSet(elems1, elems2, elems3, elems4, elems5, expectedSize);
}
/**
* Constructs a new mutable set containing the elements traversed by the specified iterator.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterator, int) newMutableSet(elements, expectedSize)}.
*
* @param elements the iterator from which elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set containing the elements traversed by the specified iterator
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterator elements, int expectedSize) {
return getDefaultFactory().newMutableSet(elements, expectedSize);
}
/**
* Constructs a new mutable set of elements consumed by the callback within the given closure.
*
* Example: TODO
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Consumer, int) newMutableSet(elementsSupplier, expectedSize)}.
*
* @param elementsSupplier the function which supply mappings for the returned set via
* the callback passed in
* @param expectedSize the expected size of the returned set
* @return a new mutable set of elements consumed by the callback within the given closure
*/
@Nonnull
public static HashFloatSet newMutableSet(@Nonnull
Consumer elementsSupplier
, int expectedSize) {
return getDefaultFactory().newMutableSet(elementsSupplier, expectedSize);
}
/**
* Constructs a new mutable set of elements from the given array.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* float[], int) newMutableSet(elements, expectedSize)}.
*
* @param elements the array whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set of elements from the given array
*/
@Nonnull
public static HashFloatSet newMutableSet(@Nonnull float[] elements, int expectedSize) {
return getDefaultFactory().newMutableSet(elements, expectedSize);
}
/**
* Constructs a new mutable set of elements from the given array.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Float[], int) newMutableSet(elements, expectedSize)}.
*
* @param elements the array whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new mutable set of elements from the given array
* @throws NullPointerException if {@code elements} array contain {@code null} elements
*/
@Nonnull
public static HashFloatSet newMutableSet(@Nonnull Float[] elements, int expectedSize) {
return getDefaultFactory().newMutableSet(elements, expectedSize);
}
/**
* Constructs a new mutable set containing the elements in the specified iterable.
*
*
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterable) newMutableSet(elements)}.
*
* @param elements the iterable whose elements are to be placed into the returned set
*
* @return a new mutable set of the elements of the specified iterable
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elements) {
return getDefaultFactory().newMutableSet(elements);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterable, Iterable) newMutableSet(elems1, elems2)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
*
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2) {
return getDefaultFactory().newMutableSet(elems1, elems2);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterable, Iterable, Iterable) newMutableSet(elems1, elems2, elems3)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
*
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3) {
return getDefaultFactory().newMutableSet(elems1, elems2, elems3);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(Iterable,
* Iterable, Iterable, Iterable) newMutableSet(elems1, elems2, elems3, elems4)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
*
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4) {
return getDefaultFactory().newMutableSet(elems1, elems2, elems3, elems4);
}
/**
* Constructs a new mutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(Iterable, Iterable, Iterable,
* Iterable, Iterable) newMutableSet(elems1, elems2, elems3, elems4, elems5)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param elems5 the fifth source of elements for the returned set
*
* @return a new mutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4,
@Nonnull Iterable elems5) {
return getDefaultFactory().newMutableSet(elems1, elems2, elems3, elems4, elems5);
}
/**
* Constructs a new mutable set containing the elements traversed by the specified iterator.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Iterator) newMutableSet(elements)}.
*
* @param elements the iterator from which elements are to be placed into the returned set
*
* @return a new mutable set containing the elements traversed by the specified iterator
*/
@Nonnull
public static HashFloatSet newMutableSet(
@Nonnull Iterator elements) {
return getDefaultFactory().newMutableSet(elements);
}
/**
* Constructs a new mutable set of elements consumed by the callback within the given closure.
*
* Example: TODO
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Consumer) newMutableSet(elementsSupplier)}.
*
* @param elementsSupplier the function which supply mappings for the returned set via
* the callback passed in
*
* @return a new mutable set of elements consumed by the callback within the given closure
*/
@Nonnull
public static HashFloatSet newMutableSet(@Nonnull
Consumer elementsSupplier
) {
return getDefaultFactory().newMutableSet(elementsSupplier);
}
/**
* Constructs a new mutable set of elements from the given array.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* float[]) newMutableSet(elements)}.
*
* @param elements the array whose elements are to be placed into the returned set
*
* @return a new mutable set of elements from the given array
*/
@Nonnull
public static HashFloatSet newMutableSet(@Nonnull float[] elements) {
return getDefaultFactory().newMutableSet(elements);
}
/**
* Constructs a new mutable set of elements from the given array.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSet(
* Float[]) newMutableSet(elements)}.
*
* @param elements the array whose elements are to be placed into the returned set
*
* @return a new mutable set of elements from the given array
* @throws NullPointerException if {@code elements} array contain {@code null} elements
*/
@Nonnull
public static HashFloatSet newMutableSet(@Nonnull Float[] elements) {
return getDefaultFactory().newMutableSet(elements);
}
/**
* Constructs a new mutable singleton set of the given element.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSetOf(
* float) newMutableSetOf(e1)}.
*
* @param e1 the sole element
* @return a new mutable singleton set of the given element
*/
@Nonnull
public static HashFloatSet newMutableSetOf(float e1) {
return getDefaultFactory().newMutableSetOf(e1);
}
/**
* Constructs a new mutable set of the two specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSetOf(
* float, float) newMutableSetOf(e1, e2)}.
*
* @param e1 the first element
* @param e2 the second element
* @return a new mutable set of the two specified elements
*/
@Nonnull
public static HashFloatSet newMutableSetOf(float e1, float e2) {
return getDefaultFactory().newMutableSetOf(e1, e2);
}
/**
* Constructs a new mutable set of the three specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSetOf(
* float, float, float) newMutableSetOf(e1, e2, e3)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @return a new mutable set of the three specified elements
*/
@Nonnull
public static HashFloatSet newMutableSetOf(float e1, float e2, float e3) {
return getDefaultFactory().newMutableSetOf(e1, e2, e3);
}
/**
* Constructs a new mutable set of the four specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSetOf(
* float, float, float, float) newMutableSetOf(e1, e2, e3, e4)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @param e4 the fourth element
* @return a new mutable set of the four specified elements
*/
@Nonnull
public static HashFloatSet newMutableSetOf(float e1, float e2, float e3, float e4) {
return getDefaultFactory().newMutableSetOf(e1, e2, e3, e4);
}
/**
* Constructs a new mutable set of the specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newMutableSetOf(float, float, float,
* float, float, float...) newMutableSetOf(e1, e2, e3, e4, e5, restElements)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @param e4 the fourth element
* @param e5 the fifth element
* @param restElements the rest elements to be placed into the set
* @return a new mutable set of the specified elements
*/
@Nonnull
public static HashFloatSet newMutableSetOf(float e1, float e2, float e3, float e4,
float e5, float... restElements) {
return getDefaultFactory().newMutableSetOf(e1, e2, e3, e4, e5, restElements);
}
/**
* Constructs a new empty updatable set of the default expected size.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet() newUpdatableSet()}.
*
* @return a new empty updatable set
*/
@Nonnull
public static HashFloatSet newUpdatableSet() {
return getDefaultFactory().newUpdatableSet();
}
/**
* Constructs a new empty updatable set of the given expected size.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(int) newUpdatableSet(expectedSize)}.
*
* @param expectedSize the expected size of the returned set
* @return a new empty updatable set of the given expected size
*/
@Nonnull
public static HashFloatSet newUpdatableSet(int expectedSize) {
return getDefaultFactory().newUpdatableSet(expectedSize);
}
/**
* Constructs a new updatable set containing the elements in the specified iterable.
*
*
*
If the specified iterable is a {@link java.util.Set}
* the {@code expectedSize} argument is ignored.
*
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterable, int) newUpdatableSet(elements, expectedSize)}.
*
* @param elements the iterable whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set of the elements of the specified iterable
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elements, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elements, expectedSize);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterable, Iterable, int) newUpdatableSet(elems1, elems2, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elems1, elems2, expectedSize);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterable, Iterable, Iterable, int) newUpdatableSet(elems1, elems2, elems3, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elems1, elems2, elems3, expectedSize);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(Iterable,
* Iterable, Iterable, Iterable, int) newUpdatableSet(elems1, elems2, elems3, elems4, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elems1, elems2, elems3, elems4, expectedSize);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(Iterable, Iterable, Iterable,
* Iterable, Iterable, int) newUpdatableSet(elems1, elems2, elems3, elems4, elems5, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param elems5 the fifth source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4,
@Nonnull Iterable elems5, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elems1, elems2, elems3, elems4, elems5, expectedSize);
}
/**
* Constructs a new updatable set containing the elements traversed by the specified iterator.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterator, int) newUpdatableSet(elements, expectedSize)}.
*
* @param elements the iterator from which elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set containing the elements traversed by the specified iterator
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterator elements, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elements, expectedSize);
}
/**
* Constructs a new updatable set of elements consumed by the callback within the given closure.
*
* Example: TODO
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Consumer, int) newUpdatableSet(elementsSupplier, expectedSize)}.
*
* @param elementsSupplier the function which supply mappings for the returned set via
* the callback passed in
* @param expectedSize the expected size of the returned set
* @return a new updatable set of elements consumed by the callback within the given closure
*/
@Nonnull
public static HashFloatSet newUpdatableSet(@Nonnull
Consumer elementsSupplier
, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elementsSupplier, expectedSize);
}
/**
* Constructs a new updatable set of elements from the given array.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* float[], int) newUpdatableSet(elements, expectedSize)}.
*
* @param elements the array whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set of elements from the given array
*/
@Nonnull
public static HashFloatSet newUpdatableSet(@Nonnull float[] elements, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elements, expectedSize);
}
/**
* Constructs a new updatable set of elements from the given array.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Float[], int) newUpdatableSet(elements, expectedSize)}.
*
* @param elements the array whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new updatable set of elements from the given array
* @throws NullPointerException if {@code elements} array contain {@code null} elements
*/
@Nonnull
public static HashFloatSet newUpdatableSet(@Nonnull Float[] elements, int expectedSize) {
return getDefaultFactory().newUpdatableSet(elements, expectedSize);
}
/**
* Constructs a new updatable set containing the elements in the specified iterable.
*
*
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterable) newUpdatableSet(elements)}.
*
* @param elements the iterable whose elements are to be placed into the returned set
*
* @return a new updatable set of the elements of the specified iterable
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elements) {
return getDefaultFactory().newUpdatableSet(elements);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterable, Iterable) newUpdatableSet(elems1, elems2)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
*
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2) {
return getDefaultFactory().newUpdatableSet(elems1, elems2);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterable, Iterable, Iterable) newUpdatableSet(elems1, elems2, elems3)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
*
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3) {
return getDefaultFactory().newUpdatableSet(elems1, elems2, elems3);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(Iterable,
* Iterable, Iterable, Iterable) newUpdatableSet(elems1, elems2, elems3, elems4)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
*
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4) {
return getDefaultFactory().newUpdatableSet(elems1, elems2, elems3, elems4);
}
/**
* Constructs a new updatable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(Iterable, Iterable, Iterable,
* Iterable, Iterable) newUpdatableSet(elems1, elems2, elems3, elems4, elems5)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param elems5 the fifth source of elements for the returned set
*
* @return a new updatable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4,
@Nonnull Iterable elems5) {
return getDefaultFactory().newUpdatableSet(elems1, elems2, elems3, elems4, elems5);
}
/**
* Constructs a new updatable set containing the elements traversed by the specified iterator.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Iterator) newUpdatableSet(elements)}.
*
* @param elements the iterator from which elements are to be placed into the returned set
*
* @return a new updatable set containing the elements traversed by the specified iterator
*/
@Nonnull
public static HashFloatSet newUpdatableSet(
@Nonnull Iterator elements) {
return getDefaultFactory().newUpdatableSet(elements);
}
/**
* Constructs a new updatable set of elements consumed by the callback within the given closure.
*
* Example: TODO
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Consumer) newUpdatableSet(elementsSupplier)}.
*
* @param elementsSupplier the function which supply mappings for the returned set via
* the callback passed in
*
* @return a new updatable set of elements consumed by the callback within the given closure
*/
@Nonnull
public static HashFloatSet newUpdatableSet(@Nonnull
Consumer elementsSupplier
) {
return getDefaultFactory().newUpdatableSet(elementsSupplier);
}
/**
* Constructs a new updatable set of elements from the given array.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* float[]) newUpdatableSet(elements)}.
*
* @param elements the array whose elements are to be placed into the returned set
*
* @return a new updatable set of elements from the given array
*/
@Nonnull
public static HashFloatSet newUpdatableSet(@Nonnull float[] elements) {
return getDefaultFactory().newUpdatableSet(elements);
}
/**
* Constructs a new updatable set of elements from the given array.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSet(
* Float[]) newUpdatableSet(elements)}.
*
* @param elements the array whose elements are to be placed into the returned set
*
* @return a new updatable set of elements from the given array
* @throws NullPointerException if {@code elements} array contain {@code null} elements
*/
@Nonnull
public static HashFloatSet newUpdatableSet(@Nonnull Float[] elements) {
return getDefaultFactory().newUpdatableSet(elements);
}
/**
* Constructs a new updatable singleton set of the given element.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSetOf(
* float) newUpdatableSetOf(e1)}.
*
* @param e1 the sole element
* @return a new updatable singleton set of the given element
*/
@Nonnull
public static HashFloatSet newUpdatableSetOf(float e1) {
return getDefaultFactory().newUpdatableSetOf(e1);
}
/**
* Constructs a new updatable set of the two specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSetOf(
* float, float) newUpdatableSetOf(e1, e2)}.
*
* @param e1 the first element
* @param e2 the second element
* @return a new updatable set of the two specified elements
*/
@Nonnull
public static HashFloatSet newUpdatableSetOf(float e1, float e2) {
return getDefaultFactory().newUpdatableSetOf(e1, e2);
}
/**
* Constructs a new updatable set of the three specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSetOf(
* float, float, float) newUpdatableSetOf(e1, e2, e3)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @return a new updatable set of the three specified elements
*/
@Nonnull
public static HashFloatSet newUpdatableSetOf(float e1, float e2, float e3) {
return getDefaultFactory().newUpdatableSetOf(e1, e2, e3);
}
/**
* Constructs a new updatable set of the four specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSetOf(
* float, float, float, float) newUpdatableSetOf(e1, e2, e3, e4)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @param e4 the fourth element
* @return a new updatable set of the four specified elements
*/
@Nonnull
public static HashFloatSet newUpdatableSetOf(float e1, float e2, float e3, float e4) {
return getDefaultFactory().newUpdatableSetOf(e1, e2, e3, e4);
}
/**
* Constructs a new updatable set of the specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newUpdatableSetOf(float, float, float,
* float, float, float...) newUpdatableSetOf(e1, e2, e3, e4, e5, restElements)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @param e4 the fourth element
* @param e5 the fifth element
* @param restElements the rest elements to be placed into the set
* @return a new updatable set of the specified elements
*/
@Nonnull
public static HashFloatSet newUpdatableSetOf(float e1, float e2, float e3, float e4,
float e5, float... restElements) {
return getDefaultFactory().newUpdatableSetOf(e1, e2, e3, e4, e5, restElements);
}
/**
* Constructs a new immutable set containing the elements in the specified iterable.
*
*
*
If the specified iterable is a {@link java.util.Set}
* the {@code expectedSize} argument is ignored.
*
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterable, int) newImmutableSet(elements, expectedSize)}.
*
* @param elements the iterable whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set of the elements of the specified iterable
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elements, int expectedSize) {
return getDefaultFactory().newImmutableSet(elements, expectedSize);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterable, Iterable, int) newImmutableSet(elems1, elems2, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2, int expectedSize) {
return getDefaultFactory().newImmutableSet(elems1, elems2, expectedSize);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterable, Iterable, Iterable, int) newImmutableSet(elems1, elems2, elems3, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3, int expectedSize) {
return getDefaultFactory().newImmutableSet(elems1, elems2, elems3, expectedSize);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(Iterable,
* Iterable, Iterable, Iterable, int) newImmutableSet(elems1, elems2, elems3, elems4, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4, int expectedSize) {
return getDefaultFactory().newImmutableSet(elems1, elems2, elems3, elems4, expectedSize);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(Iterable, Iterable, Iterable,
* Iterable, Iterable, int) newImmutableSet(elems1, elems2, elems3, elems4, elems5, expectedSize)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param elems5 the fifth source of elements for the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4,
@Nonnull Iterable elems5, int expectedSize) {
return getDefaultFactory().newImmutableSet(elems1, elems2, elems3, elems4, elems5, expectedSize);
}
/**
* Constructs a new immutable set containing the elements traversed by the specified iterator.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterator, int) newImmutableSet(elements, expectedSize)}.
*
* @param elements the iterator from which elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set containing the elements traversed by the specified iterator
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterator elements, int expectedSize) {
return getDefaultFactory().newImmutableSet(elements, expectedSize);
}
/**
* Constructs a new immutable set of elements consumed by the callback within the given closure.
*
* Example: TODO
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Consumer, int) newImmutableSet(elementsSupplier, expectedSize)}.
*
* @param elementsSupplier the function which supply mappings for the returned set via
* the callback passed in
* @param expectedSize the expected size of the returned set
* @return a new immutable set of elements consumed by the callback within the given closure
*/
@Nonnull
public static HashFloatSet newImmutableSet(@Nonnull
Consumer elementsSupplier
, int expectedSize) {
return getDefaultFactory().newImmutableSet(elementsSupplier, expectedSize);
}
/**
* Constructs a new immutable set of elements from the given array.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* float[], int) newImmutableSet(elements, expectedSize)}.
*
* @param elements the array whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set of elements from the given array
*/
@Nonnull
public static HashFloatSet newImmutableSet(@Nonnull float[] elements, int expectedSize) {
return getDefaultFactory().newImmutableSet(elements, expectedSize);
}
/**
* Constructs a new immutable set of elements from the given array.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Float[], int) newImmutableSet(elements, expectedSize)}.
*
* @param elements the array whose elements are to be placed into the returned set
* @param expectedSize the expected size of the returned set
* @return a new immutable set of elements from the given array
* @throws NullPointerException if {@code elements} array contain {@code null} elements
*/
@Nonnull
public static HashFloatSet newImmutableSet(@Nonnull Float[] elements, int expectedSize) {
return getDefaultFactory().newImmutableSet(elements, expectedSize);
}
/**
* Constructs a new immutable set containing the elements in the specified iterable.
*
*
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterable) newImmutableSet(elements)}.
*
* @param elements the iterable whose elements are to be placed into the returned set
*
* @return a new immutable set of the elements of the specified iterable
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elements) {
return getDefaultFactory().newImmutableSet(elements);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterable, Iterable) newImmutableSet(elems1, elems2)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
*
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2) {
return getDefaultFactory().newImmutableSet(elems1, elems2);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterable, Iterable, Iterable) newImmutableSet(elems1, elems2, elems3)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
*
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3) {
return getDefaultFactory().newImmutableSet(elems1, elems2, elems3);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(Iterable,
* Iterable, Iterable, Iterable) newImmutableSet(elems1, elems2, elems3, elems4)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
*
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4) {
return getDefaultFactory().newImmutableSet(elems1, elems2, elems3, elems4);
}
/**
* Constructs a new immutable set which merge the elements of the specified iterables.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(Iterable, Iterable, Iterable,
* Iterable, Iterable) newImmutableSet(elems1, elems2, elems3, elems4, elems5)}.
*
* @param elems1 the first source of elements for the returned set
* @param elems2 the second source of elements for the returned set
* @param elems3 the third source of elements for the returned set
* @param elems4 the fourth source of elements for the returned set
* @param elems5 the fifth source of elements for the returned set
*
* @return a new immutable set which merge the elements of the specified iterables
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterable elems1,
@Nonnull Iterable elems2,
@Nonnull Iterable elems3,
@Nonnull Iterable elems4,
@Nonnull Iterable elems5) {
return getDefaultFactory().newImmutableSet(elems1, elems2, elems3, elems4, elems5);
}
/**
* Constructs a new immutable set containing the elements traversed by the specified iterator.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Iterator) newImmutableSet(elements)}.
*
* @param elements the iterator from which elements are to be placed into the returned set
*
* @return a new immutable set containing the elements traversed by the specified iterator
*/
@Nonnull
public static HashFloatSet newImmutableSet(
@Nonnull Iterator elements) {
return getDefaultFactory().newImmutableSet(elements);
}
/**
* Constructs a new immutable set of elements consumed by the callback within the given closure.
*
* Example: TODO
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Consumer) newImmutableSet(elementsSupplier)}.
*
* @param elementsSupplier the function which supply mappings for the returned set via
* the callback passed in
*
* @return a new immutable set of elements consumed by the callback within the given closure
*/
@Nonnull
public static HashFloatSet newImmutableSet(@Nonnull
Consumer elementsSupplier
) {
return getDefaultFactory().newImmutableSet(elementsSupplier);
}
/**
* Constructs a new immutable set of elements from the given array.
*
* This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* float[]) newImmutableSet(elements)}.
*
* @param elements the array whose elements are to be placed into the returned set
*
* @return a new immutable set of elements from the given array
*/
@Nonnull
public static HashFloatSet newImmutableSet(@Nonnull float[] elements) {
return getDefaultFactory().newImmutableSet(elements);
}
/**
* Constructs a new immutable set of elements from the given array.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSet(
* Float[]) newImmutableSet(elements)}.
*
* @param elements the array whose elements are to be placed into the returned set
*
* @return a new immutable set of elements from the given array
* @throws NullPointerException if {@code elements} array contain {@code null} elements
*/
@Nonnull
public static HashFloatSet newImmutableSet(@Nonnull Float[] elements) {
return getDefaultFactory().newImmutableSet(elements);
}
/**
* Constructs a new immutable singleton set of the given element.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSetOf(
* float) newImmutableSetOf(e1)}.
*
* @param e1 the sole element
* @return a new immutable singleton set of the given element
*/
@Nonnull
public static HashFloatSet newImmutableSetOf(float e1) {
return getDefaultFactory().newImmutableSetOf(e1);
}
/**
* Constructs a new immutable set of the two specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSetOf(
* float, float) newImmutableSetOf(e1, e2)}.
*
* @param e1 the first element
* @param e2 the second element
* @return a new immutable set of the two specified elements
*/
@Nonnull
public static HashFloatSet newImmutableSetOf(float e1, float e2) {
return getDefaultFactory().newImmutableSetOf(e1, e2);
}
/**
* Constructs a new immutable set of the three specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSetOf(
* float, float, float) newImmutableSetOf(e1, e2, e3)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @return a new immutable set of the three specified elements
*/
@Nonnull
public static HashFloatSet newImmutableSetOf(float e1, float e2, float e3) {
return getDefaultFactory().newImmutableSetOf(e1, e2, e3);
}
/**
* Constructs a new immutable set of the four specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSetOf(
* float, float, float, float) newImmutableSetOf(e1, e2, e3, e4)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @param e4 the fourth element
* @return a new immutable set of the four specified elements
*/
@Nonnull
public static HashFloatSet newImmutableSetOf(float e1, float e2, float e3, float e4) {
return getDefaultFactory().newImmutableSetOf(e1, e2, e3, e4);
}
/**
* Constructs a new immutable set of the specified elements.
*
*
This method simply delegates to {@link #getDefaultFactory()
* }.{@link HashFloatSetFactory#newImmutableSetOf(float, float, float,
* float, float, float...) newImmutableSetOf(e1, e2, e3, e4, e5, restElements)}.
*
* @param e1 the first element
* @param e2 the second element
* @param e3 the third element
* @param e4 the fourth element
* @param e5 the fifth element
* @param restElements the rest elements to be placed into the set
* @return a new immutable set of the specified elements
*/
@Nonnull
public static HashFloatSet newImmutableSetOf(float e1, float e2, float e3, float e4,
float e5, float... restElements) {
return getDefaultFactory().newImmutableSetOf(e1, e2, e3, e4, e5, restElements);
}
private HashFloatSets() {}
}