Package adams.core.management
Class LDD
- java.lang.Object
-
- adams.core.management.LDD
-
public class LDD extends Object
Helper class for determining ldd/glibc version.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String[]LDD_DUMMY_VERSIONstatic String[]LDD_VERSIONthe determined version.
-
Constructor Summary
Constructors Constructor Description LDD()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcompareTo(String[] otherVersion)Returns this detected version of ldd with the provided one and returns if detected version is less than (< 0), equal to (= 0) or larger (> 0) than the supplied one.protected static Stringflatten(String[] version)Flattens the version into a string.static voidmain(String[] args)static String[]version()Returns (under Linux) the version of ldd (= glibc version).
-
-
-
Method Detail
-
flatten
protected static String flatten(String[] version)
Flattens the version into a string.- Parameters:
version- the version array to flatten- Returns:
- the generated string
-
version
public static String[] version()
Returns (under Linux) the version of ldd (= glibc version). For non-linux or in case of error, returnsLDD_DUMMY_VERSION.- Returns:
- the version (major, minor[, patch])
-
compareTo
public static int compareTo(String[] otherVersion)
Returns this detected version of ldd with the provided one and returns if detected version is less than (< 0), equal to (= 0) or larger (> 0) than the supplied one.- Parameters:
otherVersion- the version to compare against- Returns:
- the comparison result
-
main
public static void main(String[] args)
-
-