Package com.google.gwt.core.ext.linker
Class ArtifactSet
java.lang.Object
com.google.gwt.core.ext.linker.ArtifactSet
- All Implemented Interfaces:
Serializable,Iterable<Artifact<?>>,Collection<Artifact<?>>,Set<Artifact<?>>,SortedSet<Artifact<?>>
Provides stable ordering and de-duplication of artifacts.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Artifact<?>> c) voidclear()Comparator<? super Artifact<?>>booleanbooleancontainsAll(Collection<?> c) booleanFind all Artifacts assignable to some base type.Artifact<?>first()voidfreeze()Prevent further modification of the ArtifactSet.inthashCode()booleanisEmpty()iterator()Artifact<?>last()booleanbooleanremoveAll(Collection<?> c) booleanPossibly replace an existing Artifact.booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.SortedSet
spliterator
-
Constructor Details
-
ArtifactSet
public ArtifactSet() -
ArtifactSet
-
-
Method Details
-
add
-
addAll
-
clear
public void clear() -
comparator
- Specified by:
comparatorin interfaceSortedSet<Artifact<?>>
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<Artifact<?>>- Specified by:
containsAllin interfaceSet<Artifact<?>>
-
equals
-
find
Find all Artifacts assignable to some base type. The returned value will be a snapshot of the values in the ArtifactSet. An example of how this could be used:for (EmittedArtifact ea : artifactSet.find(EmittedArtifact.class)) { ... }- Type Parameters:
T- the desired type of Artifact- Parameters:
artifactType- the desired type of Artifact- Returns:
- all Artifacts in the ArtifactSet assignable to the desired type
-
first
-
freeze
public void freeze()Prevent further modification of the ArtifactSet. Any attempts to alter the ArtifactSet after invoking this method will result in an UnsupportedOperationException. -
hashCode
public int hashCode() -
headSet
-
isEmpty
public boolean isEmpty() -
iterator
-
last
-
remove
-
removeAll
-
replace
Possibly replace an existing Artifact.- Parameters:
artifact- the replacement Artifact- Returns:
trueif an equivalent Artifact was already present.
-
retainAll
-
size
public int size() -
subSet
-
tailSet
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
toString
-