org.rhq.core.domain.util
Class OSGiVersion
java.lang.Object
org.rhq.core.domain.util.OSGiVersion
public class OSGiVersion
- extends Object
A simple representation of an OSGi formatted version string.
All fields except the "major" part of the version can be undefined.
OSGiVersion
public OSGiVersion()
OSGiVersion
public OSGiVersion(String version)
- Creates new OSGiVersion instance from the version string.
- Parameters:
version
-
- Throws:
IllegalArgumentException
- if the version string isn't a well-formed OSGi version string.
isValid
public static boolean isValid(String version)
getMajor
public int getMajor()
- Returns:
- the major
setMajor
public void setMajor(int major)
- Parameters:
major
- the major to set
getMinorIfDefined
public Integer getMinorIfDefined()
- Returns:
- the minor
getMinor
public int getMinor()
setMinor
public void setMinor(Integer minor)
- Parameters:
minor
- the minor to set
getMicro
public int getMicro()
- Returns:
- the micro
getMicroIfDefined
public Integer getMicroIfDefined()
setMicro
public void setMicro(Integer micro)
- Parameters:
micro
- the micro to set
getQualifier
public String getQualifier()
- Returns:
- the qualifier
setQualifier
public void setQualifier(String qualifier)
- Parameters:
qualifier
- the qualifier to set
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.