Class KeyValue<T>

    • Field Detail

      • DEFAULT_TRUE_VALUES

        public static final List<String> DEFAULT_TRUE_VALUES
        The default true values.
    • Method Detail

      • getKey

        public String getKey()
        Returns:
        the key, never null.
      • getValue

        public T getValue()
        Returns:
        the value
      • setValue

        public void setValue​(T value)
        Parameters:
        value - the value to set
      • value

        public KeyValue<T> value​(T newValue)
        Parameters:
        newValue - value to set.
        Returns:
        this.
      • value

        public T value()
        Returns:
        value.
      • booleanValue

        public Boolean booleanValue​(String... trueValues)
        Parameters:
        trueValues - string true values, case is ignored.
        Returns:
        boolean value, null if value is null.
      • booleanValue

        public Boolean booleanValue​(List<String> trueValues)
        Parameters:
        trueValues - string true values, case is ignored.
        Returns:
        boolean value, null if value is null.
      • booleanValue

        public Boolean booleanValue​(List<String> trueValues,
                                    boolean ignoreCase)
        Parameters:
        trueValues - string true values.
        ignoreCase - ignore case?
        Returns:
        boolean value, null if value is null.
      • booleanValue

        public Boolean booleanValue()
        Uses DEFAULT_TRUE_VALUES, ignore case.
        Returns:
        boolean value or null if value is null.
      • booleanValue

        public Boolean booleanValue​(Boolean defaultValue)
        Parameters:
        defaultValue - the default value
        Returns:
        boolean value or default value if value is null.
      • stringValue

        public String stringValue()
        Returns:
        string value or null if value is null.
      • stringValue

        public String stringValue​(String defaultValue)
        Parameters:
        defaultValue - the default value.
        Returns:
        string value or default value if value is null.
      • stringValueDefaultIfBlank

        public String stringValueDefaultIfBlank​(String defaultValue)
        Parameters:
        defaultValue - the default value.
        Returns:
        string value or default value if value is blank.
      • integerValue

        public Integer integerValue​(Integer defaultValue)
        Parameters:
        defaultValue - the default value.
        Returns:
        integer value or default value if value is null or cannot be converted to integer.
      • longValue

        public Long longValue​(Long defaultValue)
        Parameters:
        defaultValue - the default value.
        Returns:
        long value or default value if value is null or cannot be converted to long.
      • doubleValue

        public Double doubleValue​(Double defaultValue)
        Parameters:
        defaultValue - the default value.
        Returns:
        double value or default value if value is null or cannot be converted to double.
      • floatValue

        public Float floatValue​(Float defaultValue)
        Parameters:
        defaultValue - the default value.
        Returns:
        float value or default value if value is null or cannot be converted to float.