de.smartics.properties.resource.domain
Class ArtifactId

Package class diagram package ArtifactId
java.lang.Object
  extended by de.smartics.properties.resource.domain.ArtifactId
All Implemented Interfaces:
Serializable, Comparable< ArtifactId>

@ThreadSafe
public final class ArtifactId
     
     
extends Object
implements Serializable, Comparable< ArtifactId>

Identifies an artifact of resources.

See Also:
Serialized Form

Nested Class Summary
static class ArtifactId.Builder
          Builder to create instances of ArtifactId.
 
Method Summary
 int compareTo(ArtifactId o)
          
static ArtifactId create(String groupId, String name, String version, String archiveType, String classifier)
          Helper to create instances of ArtifactId instead of using the ArtifactId.Builder.
 boolean equals(Object object)
          Returns true if the given object is semantically equal to the given object, false otherwise.
 String getArchiveType()
          Returns the artifact type that is expressed by the artifact's file name extension.
 String getClassifier()
          Returns the classifier to the artifact.
 String getGroupId()
          Returns the group the artifact belongs to.
 String getName()
          Returns the name of the artifact.
 String getVersion()
          Returns the version of the artifact.
 int hashCode()
          Returns the hash code of the object.
 String toShortString()
          Returns the short string representation of the object.
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static ArtifactId create(String groupId,
                                String name,
                                String version,
                                String archiveType,
                                String classifier)
                         throws IllegalArgumentException
Helper to create instances of ArtifactId instead of using the ArtifactId.Builder.

Parameters:
groupId - the group the artifact belongs to.
name - the identifier of the artifact.
version - the version of the artifact.
archiveType - the artifact type that is expressed by the artifact's file name extension.
classifier - the classifier to the artifact.
Returns:
the instance.
Throws:
IllegalArgumentException - if any of the arguments (except classifier) is blank or classifier is blank except being null.

getGroupId

public String getGroupId()
Returns the group the artifact belongs to.

Returns:
the group the artifact belongs to.

getName

public String getName()
Returns the name of the artifact.

Returns:
the name of the artifact.

getVersion

public String getVersion()
Returns the version of the artifact.

Returns:
the version of the artifact.

getArchiveType

public String getArchiveType()
Returns the artifact type that is expressed by the artifact's file name extension.

Returns:
the artifact type that is expressed by the artifact's file name extension.

getClassifier

public String getClassifier()
Returns the classifier to the artifact. May be null.

Returns:
the classifier to the artifact.

hashCode

public int hashCode()
Returns the hash code of the object.

Overrides:
hashCode in class Object
Returns:
the hash code.

equals

public boolean equals(Object object)
Returns true if the given object is semantically equal to the given object, false otherwise.

Overrides:
equals in class Object
Parameters:
object - the instance to compare to.
Returns:
true if the given object is semantically equal to the given object, false otherwise.

compareTo

public int compareTo(ArtifactId o)

Specified by:
compareTo in interface Comparable<ArtifactId>
See Also:
Comparable.compareTo(java.lang.Object)

toShortString

public String toShortString()
Returns the short string representation of the object.

Returns:
the short string representation of the object.

toString

public String toString()
Returns the string representation of the object.

Overrides:
toString in class Object
Returns:
the string representation of the object.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.