public class SITAPIVersion extends java.lang.Object implements APIVersion
| Constructor and Description |
|---|
SITAPIVersion(int major,
int minor)
Csotruttore che accetta i due interi rappresentanti la major e la minor version
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format()
Resituisce la versione formattata.
|
int |
getMajor()
Restituisce il numero della major version.
|
int |
getMinor()
Restituisce il numero della minor version.
|
static SITAPIVersion |
parse(java.lang.String apiVersion)
Metodo statico che restituisce un oggetto SITAPIVersion parsando una stringa che rappresenti la versione.
|
public SITAPIVersion(int major,
int minor)
major - int. Major version.minor - int. Minor version.public int getMajor()
APIVersion
versione = 1.2 -> major = 1
versione = 2.3 -> major = 2
getMajor in interface APIVersionAPIVersion.getMajor()public int getMinor()
APIVersion
versione = 1.2 -> minor = 2
versione = 2.3 -> minor = 3
getMinor in interface APIVersionAPIVersion.getMinor()public static SITAPIVersion parse(java.lang.String apiVersion) throws SITParseException
version - SITParseException - Lanciata qualora la stringa che rappresenta la versione delle API non sia correttamente formattata.public java.lang.String format()
APIVersion
major = 3 , minor = 2 -> versione formattata = "3.2"
format in interface APIVersionAPIVersion.format()