Comparable<FreeplaneVersion>
public class FreeplaneVersion extends Object implements Comparable<FreeplaneVersion>
c.freeplaneVersion
.
For usage instructions see compareTo(FreeplaneVersion)
.Modifier and Type | Field | Description |
---|---|---|
static String |
VERSION_KEY |
|
static String |
VERSION_PROPERTIES |
|
static String |
XML_VERSION |
Constructor | Description |
---|---|
FreeplaneVersion(int pMaj,
int pMid,
int pMin) |
|
FreeplaneVersion(int pMaj,
int pMid,
int pMin,
String pType,
int pNum,
String revision) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(FreeplaneVersion o) |
Use it like this:
|
int |
getMaj() |
|
int |
getMid() |
|
int |
getMin() |
|
int |
getNum() |
|
String |
getRevision() |
|
String |
getType() |
|
static FreeplaneVersion |
getVersion() |
|
static FreeplaneVersion |
getVersion(String pString) |
Parses a version string as FreeplaneVersion.
|
boolean |
isFinal() |
|
boolean |
isNewerThan(FreeplaneVersion freeplaneVersion) |
|
boolean |
isOlderThan(FreeplaneVersion freeplaneVersion) |
|
String |
numberToString() |
returns the version number only, e.g.
|
String |
toString() |
returns the full version number, e.g.
|
public static final String VERSION_KEY
public static final String VERSION_PROPERTIES
public static final String XML_VERSION
public FreeplaneVersion(int pMaj, int pMid, int pMin, String pType, int pNum, String revision)
public FreeplaneVersion(int pMaj, int pMid, int pMin)
public static FreeplaneVersion getVersion()
public static FreeplaneVersion getVersion(String pString) throws IllegalArgumentException
IllegalArgumentException
- on parse errorspublic int getMaj()
public int getMid()
public int getMin()
public int getNum()
public String getType()
public String getRevision()
public int compareTo(FreeplaneVersion o)
import org.freeplane.core.util.FreeplaneVersion def required = FreeplaneVersion.getVersion("1.2.20") if (c.freeplaneVersion < required) ui.errorMessage("Freeplane version ${c.freeplaneVersion}" + " not supported - update to at least ${required}")
compareTo
in interface Comparable<FreeplaneVersion>
public String toString()
public String numberToString()
public boolean isOlderThan(FreeplaneVersion freeplaneVersion)
public boolean isNewerThan(FreeplaneVersion freeplaneVersion)
public boolean isFinal()