Class Param

java.lang.Object
io.vertigo.core.param.Param

public final class Param extends Object
Represents a configuration parameter. This class allows the creation of configuration parameters, where each parameter is identified by a name and has a corresponding value. The name of a parameter must match a specified pattern, and the value can be of type String, Integer, or boolean.
  • Method Details

    • of

      public static Param of(String name, Integer value)
      Creates a new Integer parameter.
      Parameters:
      name - the name of the parameter
      value - the value of the parameter
      Returns:
      a new parameter
    • of

      public static Param of(String name, String value)
      Creates a new parameter.
      Parameters:
      name - the name of the parameter
      value - the value of the parameter
      Returns:
      a new parameter
    • getValue

      public String getValue()
      Gets the value of the parameter.
      Returns:
      the value of the parameter
    • getName

      public String getName()
      Gets the name of the parameter.
      Returns:
      the name of the parameter
    • getValue

      public <O> O getValue(Class<O> paramType)
      Returns the parameter as a typed value.
      Parameters:
      paramType - the type of the parameter
      Returns:
      the value of the parameter
    • getValueAsString

      public String getValueAsString()
      Returns the parameter as a String.
      Returns:
      the value of the parameter
    • getValueAsInt

      public int getValueAsInt()
      Returns the parameter as an int.
      Returns:
      the value of the parameter
    • getValueAsLong

      public long getValueAsLong()
      Returns the parameter as a long.
      Returns:
      the value of the parameter
    • getValueAsBoolean

      public boolean getValueAsBoolean()
      Returns the parameter as a boolean.
      Returns:
      the value of the parameter