Class Artifacts

    • Constructor Detail

      • Artifacts

        public Artifacts()
    • Method Detail

      • add

        public boolean add​(Artifact artifact)
        Add an artifact. If the exact artifact is already contained in the collection, it is not added again.
        Specified by:
        add in interface Collection<Artifact>
        Specified by:
        add in interface List<Artifact>
        Overrides:
        add in class ArrayList<Artifact>
        Parameters:
        artifact - The artifact
        Returns:
        true if this collection changed as a result of the call
      • removeExact

        public boolean removeExact​(ArtifactId id)
        Remove the exact artifact. The first one found is removed.
        Parameters:
        id - The artifact id
        Returns:
        true if the artifact has been removed
      • removeSame

        public boolean removeSame​(ArtifactId id)
        Remove the same artifact, neglecting the version. The first one found is removed.
        Parameters:
        id - The artifact id
        Returns:
        true if the artifact has been removed
      • getSame

        public Artifact getSame​(ArtifactId id)
        Get the artifact for the given id, neglecting the version
        Parameters:
        id - The artifact id
        Returns:
        The artifact or null otherwise
      • getExact

        public Artifact getExact​(ArtifactId id)
        Get the artifact for the given id
        Parameters:
        id - The artifact id
        Returns:
        The artifact or null otherwise
      • containsExact

        public boolean containsExact​(ArtifactId id)
        Checks whether the exact artifact is available
        Parameters:
        id - The artifact id.
        Returns:
        true if the artifact exists
      • containsSame

        public boolean containsSame​(ArtifactId id)
        Checks whether the same artifact is available, neglecting the version
        Parameters:
        id - The artifact id.
        Returns:
        true if the artifact exists