com.ibm.ia.common

Class SystemPropertyHelper

  • java.lang.Object
    • com.ibm.ia.common.SystemPropertyHelper


  • public class SystemPropertyHelper
    extends java.lang.Object
    Collection of static utility methods to parse system properties to typed values.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static double getProperyAsDouble(java.lang.String name, double defaultValue)
      Get the value of a system property as an double value.
      static int getProperyAsInt(java.lang.String name, int defaultValue)
      Get the value of a system property as an int value.
      static long getProperyAsLong(java.lang.String name, long defaultValue)
      Get the value of a system property as an long value.
      • Methods inherited from class java.lang.Object

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

      • SystemPropertyHelper

        public SystemPropertyHelper()
    • Method Detail

      • getProperyAsInt

        public static int getProperyAsInt(java.lang.String name,
                          int defaultValue)
        Get the value of a system property as an int value.
        Parameters:
        name - the name of the property to fetch.
        defaultValue - the default value of the property if it is invalid or unspecified.
        Returns:
        an int value for the property.
      • getProperyAsLong

        public static long getProperyAsLong(java.lang.String name,
                            long defaultValue)
        Get the value of a system property as an long value.
        Parameters:
        name - the name of the property to fetch.
        defaultValue - the default value of the property if it is invalid or unspecified.
        Returns:
        a long value for the property.
      • getProperyAsDouble

        public static double getProperyAsDouble(java.lang.String name,
                                double defaultValue)
        Get the value of a system property as an double value.
        Parameters:
        name - the name of the property to fetch.
        defaultValue - the default value of the property if it is invalid or unspecified.
        Returns:
        a double value for the property.

© Copyright IBM 2020