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 boolean
add(Artifact<?> o)
boolean
addAll(java.util.Collection<? extends Artifact<?>> c)
void
clear()
java.util.Comparator<? super Artifact<?>>
comparator()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
boolean
equals(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()
void
freeze()
Prevent further modification of the ArtifactSet.int
hashCode()
java.util.SortedSet<Artifact<?>>
headSet(Artifact<?> toElement)
boolean
isEmpty()
java.util.Iterator<Artifact<?>>
iterator()
Artifact<?>
last()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
replace(Artifact<?> artifact)
Possibly replace an existing Artifact.boolean
retainAll(java.util.Collection<?> c)
int
size()
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.String
toString()
-
-
-
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:
comparator
in 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:
headSet
in 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:
true
if 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:
subSet
in interfacejava.util.SortedSet<Artifact<?>>
-
tailSet
public java.util.SortedSet<Artifact<?>> tailSet(Artifact<?> fromElement)
- Specified by:
tailSet
in interfacejava.util.SortedSet<Artifact<?>>
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-