Class Artifact

  • Direct Known Subclasses:
    MavenArtifact

    public class Artifact
    extends java.lang.Object
    Artifact entity
    Since:
    1.0.0
    Author:
    Mercy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String UNKNOWN  
      static java.lang.String WILDCARD  
    • Constructor Summary

      Constructors 
      Constructor Description
      Artifact​(java.lang.String artifactId, java.lang.String version, java.net.URL location)  
    • Constructor Detail

      • Artifact

        public Artifact​(@Nonnull
                        java.lang.String artifactId,
                        @Nullable
                        java.lang.String version,
                        @Nullable
                        java.net.URL location)
    • Method Detail

      • create

        public static Artifact create​(@Nonnull
                                      java.lang.String artifactId)
      • getArtifactId

        @Nonnull
        public java.lang.String getArtifactId()
        Get the artifact Id
        Returns:
        non-null
      • getVersion

        @Nullable
        public java.lang.String getVersion()
        Get the version
        Returns:
        nullable
      • getLocation

        @Nullable
        public java.net.URL getLocation()
        Get the location of artifact resource
        Returns:
        nullable
      • matches

        public boolean matches​(Artifact artifact)
      • matchesArtifactId

        protected boolean matchesArtifactId​(Artifact artifact)
      • matchesVersion

        protected boolean matchesVersion​(Artifact artifact)
      • matches

        protected boolean matches​(Artifact artifact,
                                  java.util.function.Function<Artifact,​java.lang.String> getterFunction)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object