Interface IVersionFormat


public interface IVersionFormat

The IVersionFormat represents the Omni Version Format in compiled form. It is also a parser for versions of that format.

An instance of IVersionFormat is immutable and thus thread safe. The parser does not maintain any state.

Since:
2.0
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The string that by default will be interpreted as the logical max string when parsing optional elements of type string and a default that is the empty string (i.e.
    static final String
    The string that by default will be interpreted as the logical min string when parsing optional elements of type string and a default that is the max string (i.e.
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(String version)
    Parse the given version string.
    default void
    Deprecated.
    void
    Appends the string representation of this compiled format to the given StringBuilder.
  • Field Details

    • DEFAULT_MAX_STRING_TRANSLATION

      static final String DEFAULT_MAX_STRING_TRANSLATION
      The string that by default will be interpreted as the logical max string when parsing optional elements of type string and a default that is the empty string (i.e. OSGi)
      See Also:
    • DEFAULT_MIN_STRING_TRANSLATION

      static final String DEFAULT_MIN_STRING_TRANSLATION
      The string that by default will be interpreted as the logical min string when parsing optional elements of type string and a default that is the max string (i.e. Maven triplets)
      See Also:
  • Method Details

    • toString

      @Deprecated(since="2.9") default void toString(StringBuffer sb)
      Deprecated.
      Appends the string representation of this compiled format to the given StringBuffer.
      Parameters:
      sb - The buffer that will receive the string representation
    • toString

      void toString(StringBuilder sb)
      Appends the string representation of this compiled format to the given StringBuilder.
      Parameters:
      sb - The builder that will receive the string representation
      Since:
      2.9
    • parse

      Version parse(String version)
      Parse the given version string.
      Parameters:
      version - The version string to parse.
      Returns:
      A created version.
      Throws:
      IllegalArgumentException - If the version string could not be parsed.