Class 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 Detail

      • FormatVersion

        public FormatVersion​(java.lang.String applicationVersion,
                             int variant)
        Create file format.
        Parameters:
        applicationVersion - application version.
        variant - variant of file format.
    • 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 class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.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.