Class ConfigValue

java.lang.Object
no.ntnu.principes.domain.ConfigValue

public class ConfigValue extends Object
The ConfigValue class represents a configuration entry with a unique ID, a key identifying the configuration, a value stored as a String, and a timestamp indicating when the configuration was created.

Includes utility methods to interpret the configuration value as specific data types.

  • Constructor Details

    • ConfigValue

      public ConfigValue()
  • Method Details

    • getBooleanValue

      public boolean getBooleanValue()
      Converts the stored string value to a boolean.
      Returns:
      true if the string value represents "true", otherwise false. Returns false if the value is null or does not match "true".
    • getIntValue

      public int getIntValue()
      Converts the stored String value to an integer.
      Returns:
      the integer representation of the String value.
      Throws:
      NumberFormatException - if the value cannot be parsed as an integer.