public final class MultiReaderUnifiedSet<T> extends AbstractMultiReaderMutableCollection<T> implements RandomAccess, Externalizable, MultiReaderSet<T>
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.AbstractMultiReaderMutableCollection.LockWrapper, AbstractMultiReaderMutableCollection.ReadWriteLockWrapper| Constructor and Description |
|---|
MultiReaderUnifiedSet()
Deprecated.
Empty default constructor used for serialization.
|
add, addAll, addAllIterable, aggregateInPlaceBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, clear, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, into, isEmpty, iterator, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, parallelStream, reject, rejectWith, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterable, select, selectAndRejectWith, selectWith, size, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableList, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexflatCollectWith, toImmutableSetaddAllIterable, aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, injectIntoWith, removeAllIterable, removeIf, removeIfWith, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongaggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexforEach, forEachWith, forEachWithIndexadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, stream@Deprecated public MultiReaderUnifiedSet()
public static <T> MultiReaderUnifiedSet<T> newSet()
public static <T> MultiReaderUnifiedSet<T> newSet(int capacity)
public static <T> MultiReaderUnifiedSet<T> newSet(Iterable<T> iterable)
public static <T> MultiReaderUnifiedSet<T> newSetWith(T... elements)
public void withReadLockAndDelegate(Procedure<? super MutableSet<T>> procedure)
withReadLockAndDelegate in interface MultiReaderSet<T>public void withWriteLockAndDelegate(Procedure<? super MutableSet<T>> procedure)
withWriteLockAndDelegate in interface MultiReaderSet<T>public MutableSet<T> asSynchronized()
asSynchronized in interface MutableCollection<T>asSynchronized in interface MutableSet<T>public ImmutableSet<T> toImmutable()
toImmutable in interface MutableCollection<T>toImmutable in interface MutableSet<T>toImmutable in interface SetIterable<T>toImmutable in interface UnsortedSetIterable<T>public MutableSet<T> asUnmodifiable()
asUnmodifiable in interface MutableCollection<T>asUnmodifiable in interface MutableSet<T>public MutableSet<T> clone()
clone in interface MutableSet<T>clone in class Objectpublic <V> MutableSet<V> collect(Function<? super T,? extends V> function)
collect in interface MutableCollection<T>collect in interface RichIterable<T>collect in interface MutableSet<T>collect in interface UnsortedSetIterable<T>public MutableBooleanSet collectBoolean(BooleanFunction<? super T> booleanFunction)
collectBoolean in interface MutableCollection<T>collectBoolean in interface RichIterable<T>collectBoolean in interface MutableSet<T>collectBoolean in interface UnsortedSetIterable<T>public MutableByteSet collectByte(ByteFunction<? super T> byteFunction)
collectByte in interface MutableCollection<T>collectByte in interface RichIterable<T>collectByte in interface MutableSet<T>collectByte in interface UnsortedSetIterable<T>public MutableCharSet collectChar(CharFunction<? super T> charFunction)
collectChar in interface MutableCollection<T>collectChar in interface RichIterable<T>collectChar in interface MutableSet<T>collectChar in interface UnsortedSetIterable<T>public MutableDoubleSet collectDouble(DoubleFunction<? super T> doubleFunction)
collectDouble in interface MutableCollection<T>collectDouble in interface RichIterable<T>collectDouble in interface MutableSet<T>collectDouble in interface UnsortedSetIterable<T>public MutableFloatSet collectFloat(FloatFunction<? super T> floatFunction)
collectFloat in interface MutableCollection<T>collectFloat in interface RichIterable<T>collectFloat in interface MutableSet<T>collectFloat in interface UnsortedSetIterable<T>public MutableIntSet collectInt(IntFunction<? super T> intFunction)
collectInt in interface MutableCollection<T>collectInt in interface RichIterable<T>collectInt in interface MutableSet<T>collectInt in interface UnsortedSetIterable<T>public MutableLongSet collectLong(LongFunction<? super T> longFunction)
collectLong in interface MutableCollection<T>collectLong in interface RichIterable<T>collectLong in interface MutableSet<T>collectLong in interface UnsortedSetIterable<T>public MutableShortSet collectShort(ShortFunction<? super T> shortFunction)
collectShort in interface MutableCollection<T>collectShort in interface RichIterable<T>collectShort in interface MutableSet<T>collectShort in interface UnsortedSetIterable<T>public <V> MutableSet<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
flatCollect in interface MutableCollection<T>flatCollect in interface RichIterable<T>flatCollect in interface MutableSet<T>flatCollect in interface UnsortedSetIterable<T>public <V> MutableSet<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
collectIf in interface MutableCollection<T>collectIf in interface RichIterable<T>collectIf in interface MutableSet<T>collectIf in interface UnsortedSetIterable<T>public <P,V> MutableSet<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
collectWith in interface MutableCollection<T>collectWith in interface RichIterable<T>collectWith in interface MutableSet<T>collectWith in interface UnsortedSetIterable<T>public MutableSet<T> newEmpty()
newEmpty in interface MutableCollection<T>newEmpty in interface MutableSet<T>public MutableSet<T> reject(Predicate<? super T> predicate)
reject in interface MutableCollection<T>reject in interface RichIterable<T>reject in interface MutableSet<T>reject in interface MutableSetIterable<T>reject in interface SetIterable<T>reject in interface UnsortedSetIterable<T>public <P> MutableSet<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
rejectWith in interface MutableCollection<T>rejectWith in interface RichIterable<T>rejectWith in interface MutableSet<T>rejectWith in interface MutableSetIterable<T>rejectWith in interface SetIterable<T>rejectWith in interface UnsortedSetIterable<T>public MutableSet<T> tap(Procedure<? super T> procedure)
tap in interface MutableCollection<T>tap in interface RichIterable<T>tap in interface MutableSet<T>tap in interface MutableSetIterable<T>tap in interface SetIterable<T>tap in interface UnsortedSetIterable<T>public MutableSet<T> select(Predicate<? super T> predicate)
select in interface MutableCollection<T>select in interface RichIterable<T>select in interface MutableSet<T>select in interface MutableSetIterable<T>select in interface SetIterable<T>select in interface UnsortedSetIterable<T>public <P> MutableSet<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
selectWith in interface MutableCollection<T>selectWith in interface RichIterable<T>selectWith in interface MutableSet<T>selectWith in interface MutableSetIterable<T>selectWith in interface SetIterable<T>selectWith in interface UnsortedSetIterable<T>public PartitionMutableSet<T> partition(Predicate<? super T> predicate)
partition in interface MutableCollection<T>partition in interface RichIterable<T>partition in interface MutableSet<T>partition in interface MutableSetIterable<T>partition in interface SetIterable<T>public <P> PartitionMutableSet<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
partitionWith in interface MutableCollection<T>partitionWith in interface RichIterable<T>partitionWith in interface MutableSet<T>partitionWith in interface MutableSetIterable<T>partitionWith in interface SetIterable<T>public <S> MutableSet<S> selectInstancesOf(Class<S> clazz)
selectInstancesOf in interface MutableCollection<T>selectInstancesOf in interface RichIterable<T>selectInstancesOf in interface MutableSet<T>selectInstancesOf in interface MutableSetIterable<T>selectInstancesOf in interface SetIterable<T>selectInstancesOf in interface UnsortedSetIterable<T>public MutableSet<T> with(T element)
with in interface MutableCollection<T>with in interface MutableSet<T>with in interface MutableSetIterable<T>public MutableSet<T> without(T element)
without in interface MutableCollection<T>without in interface MutableSet<T>without in interface MutableSetIterable<T>public MutableSet<T> withAll(Iterable<? extends T> elements)
withAll in interface MutableCollection<T>withAll in interface MutableSet<T>withAll in interface MutableSetIterable<T>public MutableSet<T> withoutAll(Iterable<? extends T> elements)
withoutAll in interface MutableCollection<T>withoutAll in interface MutableSet<T>withoutAll in interface MutableSetIterable<T>public boolean equals(Object o)
public int hashCode()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic <V> MutableSetMultimap<V,T> groupBy(Function<? super T,? extends V> function)
groupBy in interface MutableCollection<T>groupBy in interface RichIterable<T>groupBy in interface MutableSet<T>groupBy in interface MutableSetIterable<T>groupBy in interface UnsortedSetIterable<T>public <V> MutableSetMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
groupByEach in interface MutableCollection<T>groupByEach in interface RichIterable<T>groupByEach in interface MutableSet<T>groupByEach in interface MutableSetIterable<T>groupByEach in interface UnsortedSetIterable<T>public <V> MutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
groupByUniqueKey in interface MutableCollection<T>groupByUniqueKey in interface RichIterable<T>@Deprecated public <S> MutableSet<Pair<T,S>> zip(Iterable<S> that)
OrderedIterable.zip(Iterable) instead.zip in interface MutableCollection<T>zip in interface RichIterable<T>zip in interface MutableSet<T>zip in interface MutableSetIterable<T>zip in interface UnsortedSetIterable<T>@Deprecated public MutableSet<Pair<T,Integer>> zipWithIndex()
OrderedIterable.zipWithIndex() instead.zipWithIndex in interface MutableCollection<T>zipWithIndex in interface RichIterable<T>zipWithIndex in interface MutableSet<T>zipWithIndex in interface MutableSetIterable<T>zipWithIndex in interface SetIterable<T>zipWithIndex in interface UnsortedSetIterable<T>public RichIterable<RichIterable<T>> chunk(int size)
chunk in interface RichIterable<T>public MutableSet<T> union(SetIterable<? extends T> set)
union in interface MutableSet<T>union in interface SetIterable<T>union in interface UnsortedSetIterable<T>public <R extends Set<T>> R unionInto(SetIterable<? extends T> set, R targetSet)
unionInto in interface SetIterable<T>public MutableSet<T> intersect(SetIterable<? extends T> set)
intersect in interface MutableSet<T>intersect in interface SetIterable<T>intersect in interface UnsortedSetIterable<T>public <R extends Set<T>> R intersectInto(SetIterable<? extends T> set, R targetSet)
intersectInto in interface SetIterable<T>public MutableSet<T> difference(SetIterable<? extends T> subtrahendSet)
difference in interface MutableSet<T>difference in interface SetIterable<T>difference in interface UnsortedSetIterable<T>public <R extends Set<T>> R differenceInto(SetIterable<? extends T> subtrahendSet, R targetSet)
differenceInto in interface SetIterable<T>public MutableSet<T> symmetricDifference(SetIterable<? extends T> setB)
symmetricDifference in interface MutableSet<T>symmetricDifference in interface SetIterable<T>symmetricDifference in interface UnsortedSetIterable<T>public <R extends Set<T>> R symmetricDifferenceInto(SetIterable<? extends T> set, R targetSet)
symmetricDifferenceInto in interface SetIterable<T>public boolean isSubsetOf(SetIterable<? extends T> candidateSuperset)
isSubsetOf in interface SetIterable<T>public boolean isProperSubsetOf(SetIterable<? extends T> candidateSuperset)
isProperSubsetOf in interface SetIterable<T>public MutableSet<UnsortedSetIterable<T>> powerSet()
powerSet in interface MutableSet<T>powerSet in interface UnsortedSetIterable<T>public <B> LazyIterable<Pair<T,B>> cartesianProduct(SetIterable<B> set)
cartesianProduct in interface SetIterable<T>public ParallelUnsortedSetIterable<T> asParallel(ExecutorService executorService, int batchSize)
asParallel in interface SetIterable<T>asParallel in interface UnsortedSetIterable<T>Copyright © 2004–2022. All rights reserved.