public class FreeplaneVersion extends java.lang.Object implements FreeplaneVersion
c.freeplaneVersion.
For usage instructions see compareTo(org.freeplane.api.FreeplaneVersion).| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VERSION_KEY |
static java.lang.String |
VERSION_PROPERTIES |
static java.lang.String |
XML_VERSION |
| Constructor and Description |
|---|
FreeplaneVersion(int pMaj,
int pMid,
int pMin) |
FreeplaneVersion(int pMaj,
int pMid,
int pMin,
java.lang.String pType,
int pNum,
java.lang.String revision) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(FreeplaneVersion o)
Use it like this:
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}")
|
int |
getMaj() |
int |
getMid() |
int |
getMin() |
int |
getNum() |
java.lang.String |
getRevision() |
java.lang.String |
getType() |
static FreeplaneVersion |
getVersion() |
static FreeplaneVersion |
getVersion(java.lang.String pString)
Parses a version string as FreeplaneVersion.
|
boolean |
isFinal() |
boolean |
isNewerThan(FreeplaneVersion freeplaneVersion) |
boolean |
isOlderThan(FreeplaneVersion freeplaneVersion) |
java.lang.String |
numberToString()
returns the version number only, e.g. "1.0.38".
|
java.lang.String |
toString()
returns the full version number, e.g. "1.0.38 rc".
|
public static final java.lang.String VERSION_KEY
public static final java.lang.String VERSION_PROPERTIES
public static final java.lang.String XML_VERSION
public FreeplaneVersion(int pMaj,
int pMid,
int pMin,
java.lang.String pType,
int pNum,
java.lang.String revision)
public FreeplaneVersion(int pMaj,
int pMid,
int pMin)
public static FreeplaneVersion getVersion()
public static FreeplaneVersion getVersion(java.lang.String pString) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - on parse errorspublic int getMaj()
getMaj in interface FreeplaneVersionpublic int getMid()
getMid in interface FreeplaneVersionpublic int getMin()
getMin in interface FreeplaneVersionpublic int getNum()
getNum in interface FreeplaneVersionpublic java.lang.String getType()
getType in interface FreeplaneVersionpublic java.lang.String getRevision()
getRevision in interface FreeplaneVersionpublic 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 java.lang.Comparable<FreeplaneVersion>public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String numberToString()
numberToString in interface FreeplaneVersionpublic boolean isOlderThan(FreeplaneVersion freeplaneVersion)
isOlderThan in interface FreeplaneVersionpublic boolean isNewerThan(FreeplaneVersion freeplaneVersion)
isNewerThan in interface FreeplaneVersionpublic boolean isFinal()
isFinal in interface FreeplaneVersion