Package com.google.gwt.core.ext.linker
Class ArtifactSet
- java.lang.Object
-
- com.google.gwt.core.ext.linker.ArtifactSet
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<Artifact<?>>,java.util.Collection<Artifact<?>>,java.util.Set<Artifact<?>>,java.util.SortedSet<Artifact<?>>
public final class ArtifactSet extends java.lang.Object implements java.util.SortedSet<Artifact<?>>, java.io.Serializable
Provides stable ordering and de-duplication of artifacts.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArtifactSet()ArtifactSet(java.util.Collection<? extends Artifact<?>> copyFrom)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Artifact<?> o)booleanaddAll(java.util.Collection<? extends Artifact<?>> c)voidclear()java.util.Comparator<? super Artifact<?>>comparator()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanequals(java.lang.Object o)<T extends Artifact<? super T>>
java.util.SortedSet<T>find(java.lang.Class<T> artifactType)Find all Artifacts assignable to some base type.Artifact<?>first()voidfreeze()Prevent further modification of the ArtifactSet.inthashCode()java.util.SortedSet<Artifact<?>>headSet(Artifact<?> toElement)booleanisEmpty()java.util.Iterator<Artifact<?>>iterator()Artifact<?>last()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanreplace(Artifact<?> artifact)Possibly replace an existing Artifact.booleanretainAll(java.util.Collection<?> c)intsize()java.util.SortedSet<Artifact<?>>subSet(Artifact<?> fromElement, Artifact<?> toElement)java.util.SortedSet<Artifact<?>>tailSet(Artifact<?> fromElement)java.lang.Object[]toArray()<T> T[]toArray(T[] a)java.lang.StringtoString()
-
-
-
Constructor Detail
-
ArtifactSet
public ArtifactSet()
-
ArtifactSet
public ArtifactSet(java.util.Collection<? extends Artifact<?>> copyFrom)
-
-
Method Detail
-
add
public boolean add(Artifact<?> o)
-
addAll
public boolean addAll(java.util.Collection<? extends Artifact<?>> c)
-
clear
public void clear()
-
comparator
public java.util.Comparator<? super Artifact<?>> comparator()
- Specified by:
comparatorin interfacejava.util.SortedSet<Artifact<?>>
-
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
equals
public boolean equals(java.lang.Object o)
-
find
public <T extends Artifact<? super T>> java.util.SortedSet<T> find(java.lang.Class<T> artifactType)
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
-
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
public java.util.SortedSet<Artifact<?>> headSet(Artifact<?> toElement)
- Specified by:
headSetin interfacejava.util.SortedSet<Artifact<?>>
-
isEmpty
public boolean isEmpty()
-
iterator
public java.util.Iterator<Artifact<?>> iterator()
-
remove
public boolean remove(java.lang.Object o)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
replace
public boolean replace(Artifact<?> artifact)
Possibly replace an existing Artifact.- Parameters:
artifact- the replacement Artifact- Returns:
trueif an equivalent Artifact was already present.
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
size
public int size()
-
subSet
public java.util.SortedSet<Artifact<?>> subSet(Artifact<?> fromElement, Artifact<?> toElement)
- Specified by:
subSetin interfacejava.util.SortedSet<Artifact<?>>
-
tailSet
public java.util.SortedSet<Artifact<?>> tailSet(Artifact<?> fromElement)
- Specified by:
tailSetin interfacejava.util.SortedSet<Artifact<?>>
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-