org.sonatype.aether.util.artifact
Class AbstractArtifact
java.lang.Object
org.sonatype.aether.util.artifact.AbstractArtifact
- All Implemented Interfaces:
- Artifact
- Direct Known Subclasses:
- DefaultArtifact, SubArtifact
public abstract class AbstractArtifact
- extends Object
- implements Artifact
A skeleton class for artifacts that implements Object.equals(Object)
, Object.hashCode()
and
Object.toString()
.
- Author:
- Benjamin Bentmann
AbstractArtifact
public AbstractArtifact()
isSnapshot
protected static boolean isSnapshot(String version)
toBaseVersion
protected static String toBaseVersion(String version)
setVersion
public Artifact setVersion(String version)
- Description copied from interface:
Artifact
- Sets the version of this artifact.
- Specified by:
setVersion
in interface Artifact
- Parameters:
version
- The version of this artifact, may be null
.
- Returns:
- The new artifact, never
null
.
setFile
public Artifact setFile(File file)
- Description copied from interface:
Artifact
- Sets the file of the artifact.
- Specified by:
setFile
in interface Artifact
- Parameters:
file
- The file of the artifact, may be null
- Returns:
- The new artifact, never
null
.
setProperties
public Artifact setProperties(Map<String,String> properties)
- Description copied from interface:
Artifact
- Sets the properties for the artifact.
- Specified by:
setProperties
in interface Artifact
- Parameters:
properties
- The properties for the artifact, may be null
.
- Returns:
- The new artifact, never
null
.
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.