Lines Matching full:immutableset
44 * <p><b>Warning:</b> Like most sets, an {@code ImmutableSet} will not function
67 public abstract class ImmutableSet<E> extends ImmutableCollection<E>
76 public static <E> ImmutableSet<E> of() {
78 return (ImmutableSet) EmptyImmutableSet.INSTANCE;
88 public static <E> ImmutableSet<E> of(E element) {
100 public static <E> ImmutableSet<E> of(E e1, E e2) {
112 public static <E> ImmutableSet<E> of(E e1, E e2, E e3) {
124 public static <E> ImmutableSet<E> of(E e1, E e2, E e3, E e4) {
136 public static <E> ImmutableSet<E> of(E e1, E e2, E e3, E e4, E e5) {
148 public static <E> ImmutableSet<E> of(E... elements) {
168 * ImmutableSet.copyOf(s)} returns an {@code ImmutableSet<String>} containing
169 * each of the strings in {@code s}, while {@code ImmutableSet.of(s)} returns
170 * a {@code ImmutableSet<Set<String>>} containing one element (the given set
174 * is an {@code ImmutableSet} (but not an {@code ImmutableSortedSet}), no copy
179 public static <E> ImmutableSet<E> copyOf(Iterable<? extends E> elements) {
180 if (elements instanceof ImmutableSet
183 ImmutableSet<E> set = (ImmutableSet<E>) elements;
196 public static <E> ImmutableSet<E> copyOf(Iterator<? extends E> elements) {
201 private static <E> ImmutableSet<E> copyOfInternal(
209 // TODO: Remove "ImmutableSet.<E>" when eclipse bug is fixed.
210 return ImmutableSet.<E>of(collection.iterator().next());
216 ImmutableSet() {}
227 if (object instanceof ImmutableSet
229 && ((ImmutableSet<?>) object).isHashCodeFast()
248 private static <E> ImmutableSet<E> create(E... elements) {
252 private static <E> ImmutableSet<E> create(
292 abstract static class ArrayImmutableSet<E> extends ImmutableSet<E> {
358 abstract static class TransformedImmutableSet<D, E> extends ImmutableSet<E> {
418 * This class is used to serialize all ImmutableSet instances, except for
453 * public static final ImmutableSet<Color> GOOGLE_COLORS
454 * = new ImmutableSet.Builder<Color>()
469 * generated by {@link ImmutableSet#builder}.
474 * Adds {@code element} to the {@code ImmutableSet}. If the {@code
475 * ImmutableSet} already contains {@code element}, then {@code add} has no
488 * Adds each element of {@code elements} to the {@code ImmutableSet},
504 * Adds each element of {@code elements} to the {@code ImmutableSet},
507 * @param elements the {@code Iterable} to add to the {@code ImmutableSet}
522 * Adds each element of {@code elements} to the {@code ImmutableSet},
525 * @param elements the elements to add to the {@code ImmutableSet}
536 * Returns a newly-created {@code ImmutableSet} based on the contents of
539 @Override public ImmutableSet<E> build() {