Class Union

    • Constructor Detail

      • Union

        public Union()
        Default constructor.
      • Union

        public Union​(Project project)
        Create a new Union.
        Parameters:
        project - owning Project
      • Union

        public Union​(ResourceCollection rc)
        Convenience constructor.
        Parameters:
        rc - the ResourceCollection to add.
      • Union

        public Union​(Project project,
                     ResourceCollection rc)
        Convenience constructor.
        Parameters:
        project - owning Project
        rc - the ResourceCollection to add.
    • Method Detail

      • getInstance

        public static Union getInstance​(ResourceCollection rc)
        Static convenience method to union an arbitrary set of Resources.
        Parameters:
        rc - a ResourceCollection.
        Returns:
        a Union.
      • list

        public java.lang.String[] list()
        Returns all Resources in String format. Provided for convenience in implementing Path.
        Returns:
        String array of Resources.
      • listResources

        public Resource[] listResources()
        Convenience method.
        Returns:
        Resource[]
      • getCollection

        @Deprecated
        protected <T> java.util.Collection<T> getCollection​(boolean asString)
        Deprecated.
        Unify the contained Resources.
        Type Parameters:
        T - resource type
        Parameters:
        asString - indicates whether the resulting Collection should contain Strings instead of Resources.
        Returns:
        a Collection of Resources.
      • getAllToStrings

        protected java.util.Collection<java.lang.String> getAllToStrings()
        Get a collection of strings representing the unified resource set (strings may duplicate).
        Returns:
        Collection<String>
      • getAllResources

        protected java.util.Set<Resource> getAllResources()
        Get the unified set of contained Resources.
        Returns:
        Set<Resource>