Package org.eclipse.xtext.findReferences
Class TargetURISet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<org.eclipse.emf.common.util.URI>
-
- org.eclipse.xtext.findReferences.TargetURISet
-
- All Implemented Interfaces:
com.google.common.base.Predicate<org.eclipse.emf.common.util.URI>,java.lang.Iterable<org.eclipse.emf.common.util.URI>,java.util.Collection<org.eclipse.emf.common.util.URI>,java.util.function.Predicate<org.eclipse.emf.common.util.URI>,java.util.Set<org.eclipse.emf.common.util.URI>,TargetURIs
public class TargetURISet extends java.util.AbstractSet<org.eclipse.emf.common.util.URI> implements TargetURIs
Default implementation forTargetURIs. We extendAbstractSeton purpose to allow this instance to be funneled through the old APIs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.findReferences.TargetURIs
TargetURIs.Key<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTargetURISet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(org.eclipse.emf.common.util.URI e)booleanaddAll(java.util.Collection<? extends org.eclipse.emf.common.util.URI> c)voidaddAllURIs(java.lang.Iterable<org.eclipse.emf.common.util.URI> uris)Adds all the uris to this set of targets.voidaddURI(org.eclipse.emf.common.util.URI uri)Add the given uri to this set of targets.booleanapply(org.eclipse.emf.common.util.URI uri)java.util.Set<org.eclipse.emf.common.util.URI>asSet()Returns aSetview on this resource URIs.voidclear()booleancontains(java.lang.Object o)booleancontains(org.eclipse.emf.common.util.URI uri)Returnstrueif the uri is contained in this set of targets.booleancontainsAll(java.util.Collection<?> c)booleancontainsResource(org.eclipse.emf.common.util.URI resourceURI)Returnstrueif this set of targets contains at least one element from the given resourceURI.booleanequals(java.lang.Object o)java.util.Collection<org.eclipse.emf.common.util.URI>getEObjectURIs(org.eclipse.emf.common.util.URI resourceURI)Return all targets that are defined in the given resource.java.util.Collection<org.eclipse.emf.common.util.URI>getTargetResourceURIs()Returns the collection of target resource URIs, e.g.<T> TgetUserData(TargetURIs.Key<T> key)Read the user data with the given key.inthashCode()booleanisEmpty()Returnstrueif there is no target URI yet.java.util.Iterator<org.eclipse.emf.common.util.URI>iterator()<T> voidputUserData(TargetURIs.Key<T> key, T data)Store user data with the given key.booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()Returns the number of known target object URIs.java.lang.Object[]toArray()<T> T[]toArray(T[] a)
-
-
-
Method Detail
-
iterator
public java.util.Iterator<org.eclipse.emf.common.util.URI> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
iteratorin interfacejava.lang.Iterable<org.eclipse.emf.common.util.URI>- Specified by:
iteratorin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Specified by:
iteratorin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
getUserData
public <T> T getUserData(TargetURIs.Key<T> key)
Description copied from interface:TargetURIsRead the user data with the given key. Returnsnullis no such user data is available.- Specified by:
getUserDatain interfaceTargetURIs
-
putUserData
public <T> void putUserData(TargetURIs.Key<T> key, T data)
Description copied from interface:TargetURIsStore user data with the given key.- Specified by:
putUserDatain interfaceTargetURIs
-
addURI
public void addURI(org.eclipse.emf.common.util.URI uri)
Description copied from interface:TargetURIsAdd the given uri to this set of targets.- Specified by:
addURIin interfaceTargetURIs
-
addAllURIs
public void addAllURIs(java.lang.Iterable<org.eclipse.emf.common.util.URI> uris)
Description copied from interface:TargetURIsAdds all the uris to this set of targets.- Specified by:
addAllURIsin interfaceTargetURIs
-
getTargetResourceURIs
public java.util.Collection<org.eclipse.emf.common.util.URI> getTargetResourceURIs()
Description copied from interface:TargetURIsReturns the collection of target resource URIs, e.g. URIs without a fragment.- Specified by:
getTargetResourceURIsin interfaceTargetURIs
-
getEObjectURIs
public java.util.Collection<org.eclipse.emf.common.util.URI> getEObjectURIs(org.eclipse.emf.common.util.URI resourceURI)
Description copied from interface:TargetURIsReturn all targets that are defined in the given resource.- Specified by:
getEObjectURIsin interfaceTargetURIs
-
apply
public boolean apply(org.eclipse.emf.common.util.URI uri)
- Specified by:
applyin interfacecom.google.common.base.Predicate<org.eclipse.emf.common.util.URI>
-
contains
public boolean contains(org.eclipse.emf.common.util.URI uri)
Description copied from interface:TargetURIsReturnstrueif the uri is contained in this set of targets.- Specified by:
containsin interfaceTargetURIs
-
containsResource
public boolean containsResource(org.eclipse.emf.common.util.URI resourceURI)
Description copied from interface:TargetURIsReturnstrueif this set of targets contains at least one element from the given resourceURI.- Specified by:
containsResourcein interfaceTargetURIs
-
isEmpty
public boolean isEmpty()
Description copied from interface:TargetURIsReturnstrueif there is no target URI yet.- Specified by:
isEmptyin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
isEmptyin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Specified by:
isEmptyin interfaceTargetURIs- Overrides:
isEmptyin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
containsin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
containsin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
toArrayin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
toArrayin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
toArrayin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
toArrayin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
add
public boolean add(org.eclipse.emf.common.util.URI e)
- Specified by:
addin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
addin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
addin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
removein interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
removein classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
containsAllin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
containsAllin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
addAll
public boolean addAll(java.util.Collection<? extends org.eclipse.emf.common.util.URI> c)
- Specified by:
addAllin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
addAllin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
addAllin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
retainAllin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
retainAllin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
removeAllin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
removeAllin classjava.util.AbstractSet<org.eclipse.emf.common.util.URI>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
clearin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
clearin classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
equalsin interfacecom.google.common.base.Predicate<org.eclipse.emf.common.util.URI>- Specified by:
equalsin interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
equalsin classjava.util.AbstractSet<org.eclipse.emf.common.util.URI>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
hashCodein interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Overrides:
hashCodein classjava.util.AbstractSet<org.eclipse.emf.common.util.URI>
-
size
public int size()
Description copied from interface:TargetURIsReturns the number of known target object URIs.- Specified by:
sizein interfacejava.util.Collection<org.eclipse.emf.common.util.URI>- Specified by:
sizein interfacejava.util.Set<org.eclipse.emf.common.util.URI>- Specified by:
sizein interfaceTargetURIs- Specified by:
sizein classjava.util.AbstractCollection<org.eclipse.emf.common.util.URI>
-
asSet
public java.util.Set<org.eclipse.emf.common.util.URI> asSet()
Description copied from interface:TargetURIsReturns aSetview on this resource URIs.- Specified by:
asSetin interfaceTargetURIs
-
-