org.sonatype.aether.util.artifact
Class AbstractArtifact

java.lang.Object
  extended by 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

Constructor Summary
AbstractArtifact()
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
protected static boolean isSnapshot(String version)
           
 Artifact setFile(File file)
           
 Artifact setProperties(Map<String,String> properties)
           
 Artifact setVersion(String version)
           
protected static String toBaseVersion(String version)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sonatype.aether.artifact.Artifact
getArtifactId, getBaseVersion, getClassifier, getExtension, getFile, getGroupId, getProperties, getProperty, getVersion, isSnapshot
 

Constructor Detail

AbstractArtifact

public AbstractArtifact()
Method Detail

isSnapshot

protected static boolean isSnapshot(String version)

toBaseVersion

protected static String toBaseVersion(String version)

setVersion

public Artifact setVersion(String version)
Specified by:
setVersion in interface Artifact

setFile

public Artifact setFile(File file)
Specified by:
setFile in interface Artifact

setProperties

public Artifact setProperties(Map<String,String> properties)
Specified by:
setProperties in interface Artifact

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.