Package com.nomagic.persistence
Class FormatVersion
java.lang.Object
com.nomagic.persistence.FormatVersion
- All Implemented Interfaces:
Serializable
File format. Has application version and variants. Same application version may have different variants, converters must
check file format not application version.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FormatVersion
deserialize
(String serialized) boolean
int
int
hashCode()
boolean
isLaterThan
(FormatVersion format) Checks if this file format is later than provided parameter.toString()
-
Constructor Details
-
FormatVersion
Create file format.- Parameters:
applicationVersion
- application version.variant
- variant of file format.
-
-
Method Details
-
isLaterThan
Checks if this file format is later than provided parameter.- Parameters:
format
- another format to check.- Returns:
- true if this file format is later than passed argument.
-
serialize
- Returns:
- serialized string of this file format.
-
deserialize
- Parameters:
serialized
- serialized string of file format.- Returns:
- FileFormat read from string.
- Throws:
IllegalArgumentException
- if applicationVersion is not valid constant from com.nomagic.license.VersionNumberMap.
-
equals
-
toString
-
hashCode
public int hashCode() -
getVersion
- Returns:
- application version of this file format.
-
getVariant
public int getVariant()- Returns:
- variant of this file format.
-