Interface TargetURIs

  • All Superinterfaces:
    java.lang.Iterable<org.eclipse.emf.common.util.URI>, com.google.common.base.Predicate<org.eclipse.emf.common.util.URI>, java.util.function.Predicate<org.eclipse.emf.common.util.URI>
    All Known Implementing Classes:
    TargetURISet

    public interface TargetURIs
    extends java.lang.Iterable<org.eclipse.emf.common.util.URI>, com.google.common.base.Predicate<org.eclipse.emf.common.util.URI>
    Encapsulate the searched data. Clients may choose to attach more information to the target URIs by means of putUserData(Key, Object). This information can be obtained in later processing steps to optimize the reference lookup. If different clients (e.g. different languages) try to share user data, they have to agree on a given key.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  TargetURIs.Key<T>
      A user data key with equalitiy semantics on the type of the value and the logical name of the key.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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.
      java.util.Set<org.eclipse.emf.common.util.URI> asSet()
      Returns a Set view on this resource URIs.
      boolean contains​(org.eclipse.emf.common.util.URI uri)
      Returns true if the uri is contained in this set of targets.
      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.
      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.
      boolean isEmpty()
      Returns true if there is no target URI yet.
      <T> void putUserData​(TargetURIs.Key<T> key, T data)
      Store user data with the given key.
      int size()
      Returns the number of known target object URIs.
      • Methods inherited from interface java.lang.Iterable

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

        apply, equals, test
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
    • Method Detail

      • getUserData

        <T> T getUserData​(TargetURIs.Key<T> key)
        Read the user data with the given key. Returns null is no such user data is available.
      • putUserData

        <T> void putUserData​(TargetURIs.Key<T> key,
                             T data)
        Store user data with the given key.
      • addURI

        void addURI​(org.eclipse.emf.common.util.URI uri)
        Add the given uri to this set of targets.
      • addAllURIs

        void addAllURIs​(java.lang.Iterable<org.eclipse.emf.common.util.URI> uris)
        Adds all the uris to this set of targets.
      • getTargetResourceURIs

        java.util.Collection<org.eclipse.emf.common.util.URI> getTargetResourceURIs()
        Returns the collection of target resource URIs, e.g. URIs without a fragment.
      • getEObjectURIs

        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.
      • contains

        boolean contains​(org.eclipse.emf.common.util.URI uri)
        Returns true if the uri is contained in this set of targets.
      • containsResource

        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.
      • isEmpty

        boolean isEmpty()
        Returns true if there is no target URI yet.
      • size

        int size()
        Returns the number of known target object URIs.
      • asSet

        java.util.Set<org.eclipse.emf.common.util.URI> asSet()
        Returns a Set view on this resource URIs.