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<?>>
,SequencedCollection<Artifact<?>>
,SequencedSet<Artifact<?>>
,Set<Artifact<?>>
,SortedSet<Artifact<?>>
Provides stable ordering and de-duplication of artifacts.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends Artifact<?>> c) void
clear()
Comparator
<? super Artifact<?>> boolean
boolean
containsAll
(Collection<?> c) boolean
Find all Artifacts assignable to some base type.Artifact
<?> first()
void
freeze()
Prevent further modification of the ArtifactSet.int
hashCode()
boolean
isEmpty()
iterator()
Artifact
<?> last()
boolean
boolean
removeAll
(Collection<?> c) boolean
Possibly replace an existing Artifact.boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.SortedSet
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed, spliterator
-
Constructor Details
-
ArtifactSet
public ArtifactSet() -
ArtifactSet
-
-
Method Details
-
add
-
addAll
-
clear
public void clear() -
comparator
- Specified by:
comparator
in interfaceSortedSet<Artifact<?>>
-
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Artifact<?>>
- Specified by:
containsAll
in 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:
true
if an equivalent Artifact was already present.
-
retainAll
-
size
public int size() -
subSet
-
tailSet
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
toString
-