Top Description Methods
org.eclipse.collections.api.set

public Interface FixedSizeSet<T>

extends MutableSet<T>, FixedSizeCollection<T>
Imports
org.eclipse.collections.api.block.procedure.Procedure, org.eclipse.collections.api.collection.FixedSizeCollection

A FixedSizeSet is a set that may be mutated, but cannot grow or shrink in size.

Method Summary

Modifier and TypeMethod and Description
public FixedSizeSet<T>
tap(Procedure<? super T> procedure)

Redeclares org.eclipse.collections.api.set.MutableSet.tap, org.eclipse.collections.api.collection.FixedSizeCollection.tap.

Executes the Procedure for each element in the iterable and returns this.

public MutableSet<T>
with(T element)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.with.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.with.

This method allows fixed size collections the ability to add elements to their existing elements.

public MutableSet<T>
withAll(Iterable<? extends T> elements)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.withAll.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.withAll.

This method allows fixed size collections the ability to add multiple elements to their existing elements.

public MutableSet<T>
without(T element)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.without.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.without.

This method allows fixed size collections the ability to remove elements from their existing elements.

public MutableSet<T>
withoutAll(Iterable<? extends T> elements)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.withoutAll.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.withoutAll.

This method allows fixed size collections the ability to remove multiple elements from their existing elements.

Inherited from org.eclipse.collections.api.collection.FixedSizeCollection:
addaddAlladdAllIterableclearremoveremoveAllremoveAllIterableremoveIfremoveIfWithretainAllretainAllIterable
Inherited from org.eclipse.collections.api.set.MutableSet:
asSynchronizedasUnmodifiableclonecollectcollectBooleancollectBytecollectCharcollectDoublecollectFloatcollectIfcollectIntcollectLongcollectShortcollectWithdifferenceflatCollectflatCollectWithgroupBygroupByEachintersectnewEmptypartitionpartitionWithpowerSetrejectrejectWithselectselectInstancesOfselectWithsymmetricDifferencetoImmutabletoImmutableSetunionzipzipWithIndex

Method Detail

tapback to summary
public FixedSizeSet<T> tap(Procedure<? super T> procedure)

Redeclares org.eclipse.collections.api.set.MutableSet.tap, org.eclipse.collections.api.collection.FixedSizeCollection.tap.

Doc from org.eclipse.collections.api.RichIterable.tap.

Executes the Procedure for each element in the iterable and returns this.

Example using a Java 8 lambda expression:

RichIterable<Person> tapped =
    people.tap(person -> LOGGER.info(person.getName()));
Annotations
@Override
withback to summary
public MutableSet<T> with(T element)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.with.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.with.

Doc from org.eclipse.collections.api.collection.FixedSizeCollection.with.

This method allows fixed size collections the ability to add elements to their existing elements. A new instance of MutableCollection is returned containing the elements of the original collection with the new element added. Implementations will return a new FixedSizeCollection where possible. In order to use this method properly with mutable and fixed size collections the following approach must be taken:

MutableCollection<String> list;
list = list.with("1");
list = list.with("2");
return list;
Annotations
@Override
withAllback to summary
public MutableSet<T> withAll(Iterable<? extends T> elements)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.withAll.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.withAll.

Doc from org.eclipse.collections.api.collection.FixedSizeCollection.withAll.

This method allows fixed size collections the ability to add multiple elements to their existing elements. A new instance of MutableCollection is returned containing the elements of the original collection with all the new elements addAll(Collection) added. Implementations will return a new FixedSizeCollection where possible. In order to use this method properly with mutable and fixed size collections the following approach must be taken:

MutableCollection<String> list;
list = list.withAll(FastList.newListWith("1", "2"));
return list;
Annotations
@Override
withoutback to summary
public MutableSet<T> without(T element)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.without.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.without.

Doc from org.eclipse.collections.api.collection.FixedSizeCollection.without.

This method allows fixed size collections the ability to remove elements from their existing elements. A new instance of MutableCollection is returned containing the elements of the original collection with the element removed. Implementations will return a new FixedSizeCollection where possible. In order to use this method properly with mutable and fixed size collections the following approach must be taken:

MutableCollection<String> list;
list = list.without("1");
list = list.without("2");
return list;
Annotations
@Override
withoutAllback to summary
public MutableSet<T> withoutAll(Iterable<? extends T> elements)

Redeclares org.eclipse.collections.api.collection.FixedSizeCollection.withoutAll.

Redeclares as abstract: org.eclipse.collections.api.set.MutableSet.withoutAll.

Doc from org.eclipse.collections.api.collection.FixedSizeCollection.withoutAll.

This method allows fixed size collections the ability to remove multiple elements from their existing elements. A new instance of MutableCollection is returned containing the elements of the original collection with the given elements removed. Implementations will return a new FixedSizeCollection where possible. In order to use this method properly with mutable and fixed size collections the following approach must be taken:

MutableCollection<String> list;
list = list.withoutAll(FastList.newListWith("1", "2"));
return list;
Annotations
@Override