Class 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 for TargetURIs. We extend AbstractSet on purpose to allow this instance to be funneled through the old APIs.
    • Nested Class Summary

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TargetURISet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(org.eclipse.emf.common.util.URI e)  
      boolean addAll​(java.util.Collection<? extends org.eclipse.emf.common.util.URI> c)  
      void addAllURIs​(java.lang.Iterable<org.eclipse.emf.common.util.URI> uris)
      Adds all the uris to this set of targets.
      void addURI​(org.eclipse.emf.common.util.URI uri)
      Add the given uri to this set of targets.
      boolean apply​(org.eclipse.emf.common.util.URI uri)  
      java.util.Set<org.eclipse.emf.common.util.URI> asSet()
      Returns a Set view on this resource URIs.
      void clear()  
      boolean contains​(java.lang.Object o)  
      boolean contains​(org.eclipse.emf.common.util.URI uri)
      Returns true if the uri is contained in this set of targets.
      boolean containsAll​(java.util.Collection<?> c)  
      boolean containsResource​(org.eclipse.emf.common.util.URI resourceURI)
      Returns true if this set of targets contains at least one element from the given resourceURI.
      boolean equals​(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> T getUserData​(TargetURIs.Key<T> key)
      Read the user data with the given key.
      int hashCode()  
      boolean isEmpty()
      Returns true if there is no target URI yet.
      java.util.Iterator<org.eclipse.emf.common.util.URI> iterator()  
      <T> void putUserData​(TargetURIs.Key<T> key, T data)
      Store user data with the given key.
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(java.util.Collection<?> c)  
      boolean retainAll​(java.util.Collection<?> c)  
      int size()
      Returns the number of known target object URIs.
      java.lang.Object[] toArray()  
      <T> T[] toArray​(T[] a)  
      • Methods inherited from class java.util.AbstractCollection

        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.lang.Iterable

        forEach
      • Methods inherited from interface com.google.common.base.Predicate

        test
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
      • Methods inherited from interface java.util.Set

        spliterator
    • Constructor Detail

      • TargetURISet

        protected TargetURISet()
    • Method Detail

      • iterator

        public java.util.Iterator<org.eclipse.emf.common.util.URI> iterator()
        Specified by:
        iterator in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        iterator in interface java.lang.Iterable<org.eclipse.emf.common.util.URI>
        Specified by:
        iterator in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Specified by:
        iterator in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • getUserData

        public <T> T getUserData​(TargetURIs.Key<T> key)
        Description copied from interface: TargetURIs
        Read the user data with the given key. Returns null is no such user data is available.
        Specified by:
        getUserData in interface TargetURIs
      • addURI

        public void addURI​(org.eclipse.emf.common.util.URI uri)
        Description copied from interface: TargetURIs
        Add the given uri to this set of targets.
        Specified by:
        addURI in interface TargetURIs
      • addAllURIs

        public void addAllURIs​(java.lang.Iterable<org.eclipse.emf.common.util.URI> uris)
        Description copied from interface: TargetURIs
        Adds all the uris to this set of targets.
        Specified by:
        addAllURIs in interface TargetURIs
      • getTargetResourceURIs

        public java.util.Collection<org.eclipse.emf.common.util.URI> getTargetResourceURIs()
        Description copied from interface: TargetURIs
        Returns the collection of target resource URIs, e.g. URIs without a fragment.
        Specified by:
        getTargetResourceURIs in interface TargetURIs
      • getEObjectURIs

        public java.util.Collection<org.eclipse.emf.common.util.URI> getEObjectURIs​(org.eclipse.emf.common.util.URI resourceURI)
        Description copied from interface: TargetURIs
        Return all targets that are defined in the given resource.
        Specified by:
        getEObjectURIs in interface TargetURIs
      • apply

        public boolean apply​(org.eclipse.emf.common.util.URI uri)
        Specified by:
        apply in interface com.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: TargetURIs
        Returns true if the uri is contained in this set of targets.
        Specified by:
        contains in interface TargetURIs
      • containsResource

        public boolean containsResource​(org.eclipse.emf.common.util.URI resourceURI)
        Description copied from interface: TargetURIs
        Returns true if this set of targets contains at least one element from the given resourceURI.
        Specified by:
        containsResource in interface TargetURIs
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: TargetURIs
        Returns true if there is no target URI yet.
        Specified by:
        isEmpty in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        isEmpty in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Specified by:
        isEmpty in interface TargetURIs
        Overrides:
        isEmpty in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        contains in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        contains in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        toArray in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        toArray in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        toArray in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        toArray in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • add

        public boolean add​(org.eclipse.emf.common.util.URI e)
        Specified by:
        add in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        add in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        add in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        remove in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        remove in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        containsAll in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        containsAll in class java.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:
        addAll in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        addAll in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        addAll in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        retainAll in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        retainAll in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        removeAll in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        removeAll in class java.util.AbstractSet<org.eclipse.emf.common.util.URI>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        clear in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        clear in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        equals in interface com.google.common.base.Predicate<org.eclipse.emf.common.util.URI>
        Specified by:
        equals in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        equals in class java.util.AbstractSet<org.eclipse.emf.common.util.URI>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        hashCode in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Overrides:
        hashCode in class java.util.AbstractSet<org.eclipse.emf.common.util.URI>
      • size

        public int size()
        Description copied from interface: TargetURIs
        Returns the number of known target object URIs.
        Specified by:
        size in interface java.util.Collection<org.eclipse.emf.common.util.URI>
        Specified by:
        size in interface java.util.Set<org.eclipse.emf.common.util.URI>
        Specified by:
        size in interface TargetURIs
        Specified by:
        size in class java.util.AbstractCollection<org.eclipse.emf.common.util.URI>
      • asSet

        public java.util.Set<org.eclipse.emf.common.util.URI> asSet()
        Description copied from interface: TargetURIs
        Returns a Set view on this resource URIs.
        Specified by:
        asSet in interface TargetURIs