Class Version
java.lang.Object
com.inductiveautomation.ignition.common.model.Version
- All Implemented Interfaces:
- Serializable,- Comparable<Version>
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintCompares two Versions.booleanbooleanexists()static VersionfromXML(InputStream is) Parses an XML document, looking for a Version element as given by getXML().Returns the version like 3.8.1 or 4.0.12-rc3intgetBeta()intintgetMajor()intgetMinor()intgetRc()intReturns the version like 3.8.1 (b1039)getXML()inthashCode()booleanisDev()booleanisFutureVersion(Version that) This differs from compareTo in that it only looks at major/minor/rev.booleanConvenience method for scripting.booleanstatic VersionCreates a version from a string of the format created by Version.toParseableString()Returns the version as a compact, parsable (non-XML) string that can be parsed with the 1-string constructor of this classtoString()
- 
Constructor Details- 
Versionpublic Version()Creates a dev version
- 
Versionpublic Version(int major, int minor, int rev, int build) 
- 
Versionpublic Version(int major, int minor, int rev, int build, int beta, int rc) 
 
- 
- 
Method Details- 
isDevpublic boolean isDev()
- 
isSnapshotpublic boolean isSnapshot()
- 
existspublic boolean exists()
- 
getBuildNumberpublic int getBuildNumber()
- 
getBetapublic int getBeta()
- 
getRcpublic int getRc()
- 
toParseableStringReturns the version as a compact, parsable (non-XML) string that can be parsed with the 1-string constructor of this class
- 
toString
- 
getBasicStringReturns the version like 3.8.1 or 4.0.12-rc3
- 
getVerboseStringReturns the version like 3.8.1 (b1039)
- 
getMajorpublic int getMajor()
- 
getMinorpublic int getMinor()
- 
getRevisionpublic int getRevision()
- 
getXML
- 
fromXMLParses an XML document, looking for a Version element as given by getXML(). If found, will return a version object corresponding to that version. If no version element is found, null is returned.- Throws:
- SAXException
- IOException
 
- 
parseCreates a version from a string of the format created by Version.toParseableString()
- 
isFutureVersionThis differs from compareTo in that it only looks at major/minor/rev. Returns true if 'that' is a future major/minor/rev and should not be restored / imported
- 
isFutureVersionConvenience method for scripting.- Parameters:
- s- String representing a Version
- Returns:
- True if string represents a future major/minor/rev
 
- 
compareToCompares two Versions. Note that this comparison is stricter than we want for Gateway restores or project imports. For those, isFutureVersion()- Specified by:
- compareToin interface- Comparable<Version>
 
- 
hashCodepublic int hashCode()
- 
equals
 
-