Package com.nomagic.persistence
Class FormatVersion
- java.lang.Object
-
- com.nomagic.persistence.FormatVersion
-
- All Implemented Interfaces:
java.io.Serializable
@OpenApiAll public class FormatVersion extends java.lang.Object implements java.io.SerializableFile format. Has application version and variants. Same application version may have different variants, converters must check file format not application version.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FormatVersion(java.lang.String applicationVersion, int variant)Create file format.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FormatVersiondeserialize(java.lang.String serialized)booleanequals(java.lang.Object o)intgetVariant()java.lang.StringgetVersion()inthashCode()booleanisLaterThan(FormatVersion format)Checks if this file format is later than provided parameter.java.lang.Stringserialize()java.lang.StringtoString()
-
-
-
Method Detail
-
isLaterThan
public boolean isLaterThan(FormatVersion format)
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
public java.lang.String serialize()
- Returns:
- serialized string of this file format.
-
deserialize
public static FormatVersion deserialize(java.lang.String serialized)
- Parameters:
serialized- serialized string of file format.- Returns:
- FileFormat read from string.
- Throws:
java.lang.IllegalArgumentException- if applicationVersion is not valid constant from com.nomagic.license.VersionNumberMap.
-
equals
public boolean equals(@CheckForNull java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getVersion
public java.lang.String getVersion()
- Returns:
- application version of this file format.
-
getVariant
public int getVariant()
- Returns:
- variant of this file format.
-
-