de.smartics.maven.issues.util
Class ReportReference

Package class diagram package ReportReference
java.lang.Object
  extended by de.smartics.maven.issues.util.ReportReference
All Implemented Interfaces:
Comparable< ReportReference>

public class ReportReference
     
     
extends Object
implements Comparable< ReportReference>

A simple model for report references.

Author:
Robert Reiner

Constructor Summary
ReportReference(String label, String url, org.apache.maven.artifact.versioning.ArtifactVersion versionRepresentative)
          Default constructor.
 
Method Summary
 int compareTo(ReportReference o)
          
 boolean equals(Object object)
          Returns true if the given object is semantically equal to the given object, false otherwise.
 String getLabel()
          Returns the label to display.
 String getUrl()
          Returns the URL to the references report.
 org.apache.maven.artifact.versioning.ArtifactVersion getVersionRepresentative()
          Returns the representative for the versions in this report.
 int hashCode()
          Returns the hash code of the object.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReportReference

public ReportReference(String label,
                       String url,
                       org.apache.maven.artifact.versioning.ArtifactVersion versionRepresentative)
                throws NullPointerException
Default constructor.

Parameters:
label - the label to display.
url - the URL to the references report.
versionRepresentative - the representative for the versions in this report.
Throws:
NullPointerException - if any parameter is null.
Method Detail

getLabel

public String getLabel()
Returns the label to display.

Returns:
the label to display.

getUrl

public String getUrl()
Returns the URL to the references report.

Returns:
the URL to the references report.

getVersionRepresentative

public org.apache.maven.artifact.versioning.ArtifactVersion getVersionRepresentative()
Returns the representative for the versions in this report. Since reports may contain a range of versions this representative is the first version to be reported about. It is assumed that all reports are disjunct, report over at least on version and all versions are consecutive. In addition to that, if the version reference is prior to another version, all versions in the report referenced by this instance are also prior.

The ordering of report references is determined by this representative.

Returns:
the representative for the versions in this report.

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(ReportReference o)

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

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


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