Lines Matching defs:ImmutableSet

45  * <p><b>Warning:</b> Like most sets, an {@code ImmutableSet} will not function
68 public abstract class ImmutableSet<E> extends ImmutableCollection<E>
77 public static <E> ImmutableSet<E> of() {
78 return (ImmutableSet<E>) EmptyImmutableSet.INSTANCE;
87 public static <E> ImmutableSet<E> of(E element) {
98 public static <E> ImmutableSet<E> of(E e1, E e2) {
109 public static <E> ImmutableSet<E> of(E e1, E e2, E e3) {
120 public static <E> ImmutableSet<E> of(E e1, E e2, E e3, E e4) {
131 public static <E> ImmutableSet<E> of(E e1, E e2, E e3, E e4, E e5) {
143 public static <E> ImmutableSet<E> of(E e1, E e2, E e3, E e4, E e5, E e6,
160 private static <E> ImmutableSet<E> construct(Object... elements) {
240 public static <E> ImmutableSet<E> copyOf(E[] elements) {
259 * ImmutableSet.copyOf(s)} returns an {@code ImmutableSet<String>} containing
260 * each of the strings in {@code s}, while {@code ImmutableSet.of(s)} returns
261 * a {@code ImmutableSet<Set<String>>} containing one element (the given set
270 public static <E> ImmutableSet<E> copyOf(Iterable<? extends E> elements) {
283 public static <E> ImmutableSet<E> copyOf(Iterator<? extends E> elements) {
296 * ImmutableSet.copyOf(s)} returns an {@code ImmutableSet<String>} containing
297 * each of the strings in {@code s}, while {@code ImmutableSet.of(s)} returns
298 * a {@code ImmutableSet<Set<String>>} containing one element (the given set
309 * <li>{@code ImmutableSet.copyOf()} is idempotent with respect to pointer
320 public static <E> ImmutableSet<E> copyOf(Collection<? extends E> elements) {
321 if (elements instanceof ImmutableSet
324 ImmutableSet<E> set = (ImmutableSet<E>) elements;
332 private static <E> ImmutableSet<E> copyFromCollection(
349 ImmutableSet() {}
360 if (object instanceof ImmutableSet
362 && ((ImmutableSet<?>) object).isHashCodeFast()
377 abstract static class ArrayImmutableSet<E> extends ImmutableSet<E> {
448 abstract static class TransformedImmutableSet<D, E> extends ImmutableSet<E> {
506 * This class is used to serialize all ImmutableSet instances, except for
539 * public static final ImmutableSet<Color> GOOGLE_COLORS =
540 * new ImmutableSet.Builder<Color>()
557 * generated by {@link ImmutableSet#builder}.
562 * Adds {@code element} to the {@code ImmutableSet}. If the {@code
563 * ImmutableSet} already contains {@code element}, then {@code add} has no
576 * Adds each element of {@code elements} to the {@code ImmutableSet},
591 * Adds each element of {@code elements} to the {@code ImmutableSet},
594 * @param elements the {@code Iterable} to add to the {@code ImmutableSet}
609 * Adds each element of {@code elements} to the {@code ImmutableSet},
612 * @param elements the elements to add to the {@code ImmutableSet}
623 * Returns a newly-created {@code ImmutableSet} based on the contents of
626 @Override public ImmutableSet<E> build() {