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.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:
- 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 FormatVersion
deserialize(java.lang.String serialized)
boolean
equals(java.lang.Object o)
int
getVariant()
java.lang.String
getVersion()
int
hashCode()
boolean
isLaterThan(FormatVersion format)
Checks if this file format is later than provided parameter.java.lang.String
serialize()
java.lang.String
toString()
-
-
-
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:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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.
-
-