net.sourceforge.atunes.kernel.modules.updates
Class ApplicationVersion

java.lang.Object
  extended by net.sourceforge.atunes.kernel.modules.updates.ApplicationVersion
All Implemented Interfaces:
java.lang.Comparable<ApplicationVersion>

public class ApplicationVersion
extends java.lang.Object
implements java.lang.Comparable<ApplicationVersion>

This class represents a version, i.e. "1.7.4" where 1 is major number, 7 is minor number, and 4 is revision number. Also contains a download URL for the version and a release date


Nested Class Summary
static class ApplicationVersion.VersionType
           
 
Constructor Summary
ApplicationVersion(java.lang.String date, int majorNumber, int minorNumber, int revisionNumber, ApplicationVersion.VersionType version, java.lang.String name, java.lang.String downloadURL)
           
 
Method Summary
 int compareTo(ApplicationVersion version)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDate()
          Gets release date.
 java.lang.String getDownloadURL()
          Gets download url.
 int getMajorNumber()
          Gets major number.
 int getMinorNumber()
          Gets minor number.
 java.lang.String getName()
           
 int getRevisionNumber()
          Gets revision number.
 ApplicationVersion.VersionType getVersion()
          Returns version type
 int hashCode()
           
protected  void setDate(java.lang.String date)
          Sets release date.
protected  void setDownloadURL(java.lang.String downloadURL)
          Sets download url.
protected  void setMajorNumber(int majorNumber)
          Sets major number.
protected  void setMinorNumber(int minorNumber)
          Sets minor number.
protected  void setName(java.lang.String name)
           
protected  void setRevisionNumber(int revisionNumber)
          Sets revision number.
protected  void setVersion(ApplicationVersion.VersionType version)
          Sets the version type value
 java.lang.String toShortString()
          Returns short version in string format.
 java.lang.String toString()
          Returns full version in string format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationVersion

@ConstructorProperties(value={"date","majorNumber","minorNumber","revisionNumber","version","name","downloadURL"})
public ApplicationVersion(java.lang.String date,
                                                int majorNumber,
                                                int minorNumber,
                                                int revisionNumber,
                                                ApplicationVersion.VersionType version,
                                                java.lang.String name,
                                                java.lang.String downloadURL)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

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

getDate

public java.lang.String getDate()
Gets release date.

Returns:
the date

getDownloadURL

public java.lang.String getDownloadURL()
Gets download url.

Returns:
the download url

getName

public java.lang.String getName()
Returns:
the name

getMajorNumber

public int getMajorNumber()
Gets major number.

Returns:
the major number

getMinorNumber

public int getMinorNumber()
Gets minor number.

Returns:
the minor number

getRevisionNumber

public int getRevisionNumber()
Gets revision number.

Returns:
the revision number

toString

public java.lang.String toString()
Returns full version in string format.

Overrides:
toString in class java.lang.Object
Returns:
the version in string format

toShortString

public java.lang.String toShortString()
Returns short version in string format.

Returns:
the short version in string format

getVersion

public ApplicationVersion.VersionType getVersion()
Returns version type

Returns:
VersionType

setDate

protected void setDate(java.lang.String date)
Sets release date.

Parameters:
date - the date

setName

protected void setName(java.lang.String name)
Parameters:
name - the name to set

setDownloadURL

protected void setDownloadURL(java.lang.String downloadURL)
Sets download url.

Parameters:
downloadURL - the download url

setMajorNumber

protected void setMajorNumber(int majorNumber)
Sets major number.

Parameters:
majorNumber - the major number

setMinorNumber

protected void setMinorNumber(int minorNumber)
Sets minor number.

Parameters:
minorNumber - the minor number

setRevisionNumber

protected void setRevisionNumber(int revisionNumber)
Sets revision number.

Parameters:
revisionNumber - the revision number

setVersion

protected void setVersion(ApplicationVersion.VersionType version)
Sets the version type value

Parameters:
finalVersion -

compareTo

public int compareTo(ApplicationVersion version)
Specified by:
compareTo in interface java.lang.Comparable<ApplicationVersion>


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.