Package org.freeplane.core.util
Class FreeplaneVersion
java.lang.Object
org.freeplane.core.util.FreeplaneVersion
- All Implemented Interfaces:
- Comparable<FreeplaneVersion>,- FreeplaneVersion
provides access to the current Freeplane version. In scripts use 
c.freeplaneVersion.
 For usage instructions see compareTo(org.freeplane.api.FreeplaneVersion).- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionFreeplaneVersion(int pMaj, int pMid, int pMin) FreeplaneVersion(int pMaj, int pMid, int pMin, String pType, int pNum) 
- 
Method SummaryModifier and TypeMethodDescriptionintUse it like this:intgetMaj()intgetMid()intgetMin()intgetNum()getType()static FreeplaneVersionstatic FreeplaneVersiongetVersion(String pString) Parses a version string as FreeplaneVersion.booleanisFinal()booleanisNewerThan(FreeplaneVersion freeplaneVersion) booleanisOlderThan(FreeplaneVersion freeplaneVersion) returns the version number only, e.g.toString()returns the full version number, e.g.
- 
Field Details- 
VERSION_KEY- See Also:
 
- 
VERSION_PROPERTIES- See Also:
 
- 
XML_VERSION- See Also:
 
 
- 
- 
Constructor Details- 
FreeplaneVersion
- 
FreeplaneVersionpublic FreeplaneVersion(int pMaj, int pMid, int pMin) 
 
- 
- 
Method Details- 
getVersion
- 
getVersionParses a version string as FreeplaneVersion. Ignores leading 'v' (e.g. "v1.2.6") and accept '.' and ' ' as separator.- Throws:
- IllegalArgumentException- on parse errors
 
- 
getMajpublic int getMaj()- Specified by:
- getMajin interface- FreeplaneVersion
 
- 
getMidpublic int getMid()- Specified by:
- getMidin interface- FreeplaneVersion
 
- 
getMinpublic int getMin()- Specified by:
- getMinin interface- FreeplaneVersion
 
- 
getNumpublic int getNum()- Specified by:
- getNumin interface- FreeplaneVersion
 
- 
getType- Specified by:
- getTypein interface- FreeplaneVersion
 
- 
getRevision- Specified by:
- getRevisionin interface- FreeplaneVersion
 
- 
compareToUse 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}")- Specified by:
- compareToin interface- Comparable<FreeplaneVersion>
 
- 
toStringreturns the full version number, e.g. "1.0.38 rc".
- 
numberToStringreturns the version number only, e.g. "1.0.38".- Specified by:
- numberToStringin interface- FreeplaneVersion
 
- 
isOlderThan- Specified by:
- isOlderThanin interface- FreeplaneVersion
 
- 
isNewerThan- Specified by:
- isNewerThanin interface- FreeplaneVersion
 
- 
isFinalpublic boolean isFinal()- Specified by:
- isFinalin interface- FreeplaneVersion
 
 
-