org.apache.axis2.description
Class Version
java.lang.Object
org.apache.axis2.description.Version
- All Implemented Interfaces:
- Serializable, Comparable<Version>
public class Version
- extends Object
- implements Serializable, Comparable<Version>
Class representing a version number and implementing a comparison algorithm compatible
with Maven. This class is primarily used for module versions.
- See Also:
- Serialized Form
|
Constructor Summary |
Version(int[] components,
String qualifier)
Constructor. |
Version(String versionString)
Constructor that parses the version from a string. |
SNAPSHOT
public static final Version SNAPSHOT
Version
public Version(int[] components,
String qualifier)
- Constructor.
- Parameters:
components - the numeric components of the version; may be null for SNAPSHOT versionqualifier - the qualifier
Version
public Version(String versionString)
throws ParseException
- Constructor that parses the version from a string. The version must have the
following format:
integer ( "." integer )* ( "-" qualifier )?
- Parameters:
versionString - the string representation of the version
- Throws:
ParseException - if the version is not in the correct format
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
compareTo
public int compareTo(Version o)
- Specified by:
compareTo in interface Comparable<Version>
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.