iterator() as this method requires an external
lock to be taken to provide thread-safe iteration. You can use an iterator() if you use the
withReadLockAndDelegate() or withWriteLockAndDelegate() methods. Both of these methods take a parameter of type
Procedure<MutableSet>, and a wrapped version of the underlying Unified is returned. This wrapper guarantees that no
external pointer can ever reference the underlying UnifiedSet outside a locked procedure. In the case of the read
lock method, an Unmodifiable version of the collection is offered, which will throw UnsupportedOperationExceptions on
any write methods like add or remove.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private MutableSet | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ParallelUnsortedSetIterable | asParallel(ExecutorService executorService, int batchSize)
Implements org. Returns a parallel iterable of this SetIterable. |
| pack-priv MultiReaderUnifiedSet. | |
| public MutableSet | asSynchronized()
Implements org. Returns a synchronized wrapper backed by this collection. |
| public MutableSet | asUnmodifiable()
Implements org. Returns an unmodifiable view of the set. |
| pack-priv MultiReaderUnifiedSet. | |
| public <B> LazyIterable | cartesianProduct(SetIterable<B> set)
Implements org. Returns the set whose members are all possible ordered pairs (a, b) where a is a member of |
| public RichIterable | chunk(int size)
Implements org. Partitions elements in fixed size chunks. |
| public MultiReaderSet | clone()
Overrides java. Implements org. Creates and returns a copy of this object. |
| public <V> MutableSet | collect(Function<? super T, ? extends V> function)
Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection. |
| public MutableBooleanSet | collectBoolean(BooleanFunction<? super T> booleanFunction)
Overrides default org. Returns a new primitive |
| public MutableByteSet | collectByte(ByteFunction<? super T> byteFunction)
Overrides default org. Returns a new primitive |
| public MutableCharSet | collectChar(CharFunction<? super T> charFunction)
Overrides default org. Returns a new primitive |
| public MutableDoubleSet | collectDouble(DoubleFunction<? super T> doubleFunction)
Overrides default org. Returns a new primitive |
| public MutableFloatSet | collectFloat(FloatFunction<? super T> floatFunction)
Overrides default org. Returns a new primitive |
| public <V> MutableSet | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)
Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate. |
| public MutableIntSet | collectInt(IntFunction<? super T> intFunction)
Overrides default org. Returns a new primitive |
| public MutableLongSet | collectLong(LongFunction<? super T> longFunction)
Overrides default org. Returns a new primitive |
| public MutableShortSet | collectShort(ShortFunction<? super T> shortFunction)
Overrides default org. Returns a new primitive |
| public <P, V> MutableSet | collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)
Implements org. Same as |
| public MutableSet | difference(SetIterable<? extends T> subtrahendSet)
Implements org. Returns the set of all members of |
| public <R extends Set | differenceInto(SetIterable<? extends T> subtrahendSet, R targetSet)
Implements org. Same as |
| public boolean | equals(Object o)
Overrides java. Implements org. Follows the same general contract as |
| public <V> MutableSet | flatCollect(Function<? super T, ? extends Iterable<V>> function)
Implements org.
|
| protected MutableSet | |
| public <V> MutableSetMultimap | groupBy(Function<? super T, ? extends V> function)
Implements org. For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable. |
| public <V> MutableSetMultimap | groupByEach(Function<? super T, ? extends Iterable<V>> function)
Implements org. Similar to |
| public <V> MutableMap | groupByUniqueKey(Function<? super T, ? extends V> function)
Overrides default org. Implements org. For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key. |
| public int | hashCode()
Overrides java. Implements org. Follows the same general contract as |
| public MutableSet | intersect(SetIterable<? extends T> set)
Implements org. Returns the set of all objects that are members of both |
| public <R extends Set | intersectInto(SetIterable<? extends T> set, R targetSet)
Implements org. Same as |
| public boolean | isProperSubsetOf(SetIterable<? extends T> candidateSuperset)
Implements org. Returns true if all the members of |
| public boolean | isSubsetOf(SetIterable<? extends T> candidateSuperset)
Implements org. Returns true if all the members of |
| public MultiReaderSet | newEmpty()
Implements org. Creates a new empty mutable version of the same collection type. |
| public static <T> MultiReaderUnifiedSet | |
| public static <T> MultiReaderUnifiedSet | |
| public static <T> MultiReaderUnifiedSet | |
| public static <T> MultiReaderUnifiedSet | |
| public PartitionMutableSet | partition(Predicate<? super T> predicate)
Implements org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public <P> PartitionMutableSet | partitionWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Filters a collection into a PartitionIterable based on the evaluation of the predicate. |
| public MutableSet | powerSet()
Implements org. Returns the set whose members are all possible subsets of |
| public void | readExternal(ObjectInput in)
Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public MutableSet | reject(Predicate<? super T> predicate)
Implements org. Returns all elements of the source collection that return false when evaluating of the predicate. |
| public <P> MutableSet | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Similar to |
| public MutableSet | select(Predicate<? super T> predicate)
Implements org. Returns all elements of the source collection that return true when evaluating the predicate. |
| public <S> MutableSet | selectInstancesOf(Class<S> clazz)
Implements org. Returns all elements of the source collection that are instances of the Class |
| public <P> MutableSet | selectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Similar to |
| public MutableSet | symmetricDifference(SetIterable<? extends T> setB)
Implements org. Returns the set of all objects that are a member of exactly one of |
| public <R extends Set | symmetricDifferenceInto(SetIterable<? extends T> set, R targetSet)
Implements org. Same as |
| public MultiReaderSet | tap(Procedure<? super T> procedure)
Overrides default org. Implements org. Executes the Procedure for each element in the iterable and returns |
| public ImmutableSet | toImmutable()
Implements org. Returns an immutable copy of this set. |
| public MutableSet | union(SetIterable<? extends T> set)
Implements org. Returns the set of all objects that are a member of |
| public <R extends Set | unionInto(SetIterable<? extends T> set, R targetSet)
Implements org. Same as |
| public void | withReadLockAndDelegate(Procedure<? super MutableSet<T>> procedure)
Implements org.
|
| public void | withWriteLockAndDelegate(Procedure<? super MutableSet<T>> procedure)
Implements org.
|
| public void | writeExternal(ObjectOutput out)
Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
| public <S> MutableSet | zip(Iterable<S> that)
Implements org.
Deprecated
in 6.0. Use
OrderedIterable#zip(Iterable) instead.
Returns a |
| public MutableSet | zipWithIndex()
Implements org.
Deprecated
in 6.0. Use
OrderedIterable#zipWithIndex() instead.
Zips this |