java.lang.Object
de.unijena.cheminf.deglycosylation.Main

public class Main extends Object
Main entry point for the Sugar Removal Utility command-line application. The main() method instantiates the SugarRemovalUtilityCmdApplication class, calls its execute() function and measures the time it takes for execution.
Version:
1.3.2.0
Author:
Jonas Schaub
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    compareVersions(String aVersionString1, String aVersionString2)
    Compares two version strings of the form "x.y.z" of variable length position by position after splitting at each "." and parsing to integers.
    static void
    main(String[] args)
    Instantiates the SugarRemovalUtilityCmdApplication class and calls its execute() method.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Main

      public Main()
  • Method Details

    • main

      public static void main(String[] args)
      Instantiates the SugarRemovalUtilityCmdApplication class and calls its execute() method. This method also tests the Java version (must be version 17.0.4 or higher) and measures the time it takes to execute the application. The command-line arguments (args) are not parsed or tested here but passed on to the SugarRemovalUtilityCmdApplication class constructor. Outputs are written to System.out and System.err if anything goes wrong. Exceptions are not thrown. The system is exited if an error occurs or the application is run successfully.
      Parameters:
      args - the command line arguments, see SugarRemovalUtilityCmdApplication class constructor for more info
    • compareVersions

      public static int compareVersions(String aVersionString1, String aVersionString2) throws IllegalArgumentException
      Compares two version strings of the form "x.y.z" of variable length position by position after splitting at each "." and parsing to integers. The result is analogous to what Integer.compare(int a, int b) returns for the first position that differs between the two version strings. If they are of different size and the shorter one is a substring of the longer one starting at position 0, their lengths are compared.
      Parameters:
      aVersionString1 - one version string v1
      aVersionString2 - another version string v2
      Returns:
      the value 0 if v1 == v2; a value less than 0 if v1 smaller than v2; and a value greater than 0 if v1 greater than v2
      Throws:
      IllegalArgumentException - if one of the parameters is null, empty, or blank