userinterface.cmdline
Class CommandLine

java.lang.Object
  extended by userinterface.cmdline.CommandLine

public class CommandLine
extends java.lang.Object

Class which forwards information from command line input to further classes which serve as interface between command line and tools for calculation

Author:
Stefanie Kaufmann

Constructor Summary
CommandLine()
           
 
Method Summary
static java.lang.String formatList(java.lang.String[] list)
          allows to print a String[] into a human readable format
static boolean isValid(java.lang.String method)
          Checks if the chosen method is a valid one
static void main(java.lang.String[] args)
          Main method which is called upon starting the command line input
static void printHelp()
          Print a detailed description of all available flags for cmdline interface onto the console
static java.lang.String[] shift(java.lang.String[] input)
          Shifts the content of a given String array one position to the left, thereby erasing the first element
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLine

public CommandLine()
Method Detail

formatList

public static java.lang.String formatList(java.lang.String[] list)
allows to print a String[] into a human readable format

Parameters:
list -
Returns:
Array as String

isValid

public static boolean isValid(java.lang.String method)
Checks if the chosen method is a valid one

Parameters:
method -
Returns:
true if the method is allowed, false otherwise

shift

public static java.lang.String[] shift(java.lang.String[] input)
Shifts the content of a given String array one position to the left, thereby erasing the first element

Parameters:
input -
Returns:
An array missing the first element of the original input

printHelp

public static void printHelp()
Print a detailed description of all available flags for cmdline interface onto the console


main

public static void main(java.lang.String[] args)
Main method which is called upon starting the command line input

Parameters:
args -