Klasse ConfigFile.Reader

java.lang.Object
de.voxelmap.voxelconfig.ConfigFile.Reader
Umschließende Klasse:
ConfigFile

public static final class ConfigFile.Reader extends Object
Reader for accessing parsed config values with type-safe defaults.
  • Methodenübersicht

    Modifikator und Typ
    Methode
    Beschreibung
    boolean
    getBoolean(String key, boolean defaultValue)
    Returns a boolean value, or defaultValue if the key is absent.
    float
    getFloat(String key, float defaultValue, float min, float max)
    Returns a float value clamped to [min, max], or defaultValue if absent.
    int
    getInt(String key, int defaultValue, int min, int max)
    Returns an int value clamped to [min, max], or defaultValue if absent.
    getString(String key, String defaultValue)
    Returns the raw string value, or defaultValue if the key is absent.
    boolean
    has(String key)
    Returns whether a key exists in the config file.

    Von Klasse geerbte Methoden Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Methodendetails

    • getString

      public String getString(String key, String defaultValue)
      Returns the raw string value, or defaultValue if the key is absent.
    • getBoolean

      public boolean getBoolean(String key, boolean defaultValue)
      Returns a boolean value, or defaultValue if the key is absent.
    • getInt

      public int getInt(String key, int defaultValue, int min, int max)
      Returns an int value clamped to [min, max], or defaultValue if absent.
    • getFloat

      public float getFloat(String key, float defaultValue, float min, float max)
      Returns a float value clamped to [min, max], or defaultValue if absent.
    • has

      public boolean has(String key)
      Returns whether a key exists in the config file.