Class LibraryVersion

java.lang.Object
i5.las2peer.api.SemverVersion
i5.las2peer.classLoaders.libraries.LibraryVersion
All Implemented Interfaces:
Serializable

public class LibraryVersion extends SemverVersion
A simple class managing a library version number in the format <major> "." <minor> "." <patch> "-" <pre-release> "+" <build> (where minor, patch, pre-release and build are optional) or "*" (no version specified / matches all versions).
See Also:
  • Constructor Details

    • LibraryVersion

      public LibraryVersion(String version) throws IllegalArgumentException
      Generate a Version from String representation format : Semver <major> "." <minor> "." <patch> "-" <pre-release> "+" <build> (where minor, patch, pre-release and build are optional) or "*" (no version specified / matches all versions)
      Parameters:
      version - A version string representation
      Throws:
      IllegalArgumentException - If the string contains no valid version representation
    • LibraryVersion

      public LibraryVersion(int major, int minor, int patch, String preRelease, String build) throws IllegalArgumentException
      generate a new LibraryVersion
      Parameters:
      major - Major version number part
      minor - Minor version number part
      patch - Sub version number part
      preRelease - pre-release version
      build - build version
      Throws:
      IllegalArgumentException - If a version number part is smaller than 0
    • LibraryVersion

      public LibraryVersion(int major, int minor, int patch, String preRelease) throws IllegalArgumentException
      generate a new LibraryVersion
      Parameters:
      major - Major version number part
      minor - Minor version number part
      patch - Sub version number part
      preRelease - pre-release version
      Throws:
      IllegalArgumentException - If a version number part is smaller than 0
    • LibraryVersion

      public LibraryVersion(int major, int minor, int patch) throws IllegalArgumentException
      generate a new LibraryVersion
      Parameters:
      major - Major version number part
      minor - Minor version number part
      patch - patch version number part
      Throws:
      IllegalArgumentException - If a version number part is smaller than 0
    • LibraryVersion

      public LibraryVersion(int major, int minor) throws IllegalArgumentException
      generate a new LibraryVersion
      Parameters:
      major - Major version number part
      minor - Minor version number part
      Throws:
      IllegalArgumentException - If a version number part is smaller than 0
    • LibraryVersion

      public LibraryVersion(int major) throws IllegalArgumentException
      generate a new LibraryVersion
      Parameters:
      major - Major version number part
      Throws:
      IllegalArgumentException - If a version number part is smaller than 0