Class ConfigManager


  • public class ConfigManager
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfigManager()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean asBoolean​(java.lang.String key)
      Gets a configuration value as a boolean.
      double asDouble​(java.lang.String key)
      Gets a configuration value as a double.
      int asInt​(java.lang.String key)
      Gets a configuration value as an int.
      int[] asIntArray​(java.lang.String key)  
      java.lang.String asString​(java.lang.String key)
      Gets a configuration value as a String.
      java.lang.String[] asStringArray​(java.lang.String key)  
      java.lang.String toString​(java.lang.Class<?> _class)  
      • Methods inherited from class java.lang.Object

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

      • ConfigManager

        public ConfigManager()
    • Method Detail

      • asInt

        public int asInt​(java.lang.String key)
        Gets a configuration value as an int.
        Parameters:
        key - Key of the configuration.
        Returns:
        The value as an int.
        Throws:
        java.lang.IllegalArgumentException - If the value is not a number.
      • asString

        public java.lang.String asString​(java.lang.String key)
        Gets a configuration value as a String.
        Parameters:
        key - Key of the configuration.
        Returns:
        The value as a String.
      • asBoolean

        public boolean asBoolean​(java.lang.String key)
        Gets a configuration value as a boolean.
        Parameters:
        key - Key of the configuration.
        Returns:
        The value as a boolean.
      • asDouble

        public double asDouble​(java.lang.String key)
        Gets a configuration value as a double.
        Parameters:
        key - Key of the configuration.
        Returns:
        The value as a double.
        Throws:
        java.lang.IllegalArgumentException - If the value is not a number.
      • asStringArray

        public java.lang.String[] asStringArray​(java.lang.String key)
      • asIntArray

        public int[] asIntArray​(java.lang.String key)
      • toString

        public java.lang.String toString​(java.lang.Class<?> _class)