Class VariableValue

    • Method Detail

      • boolValue

        public final Boolean boolValue()

        If this feature uses the Boolean variation type, this field contains the Boolean value of this variation.

        Returns:
        If this feature uses the Boolean variation type, this field contains the Boolean value of this variation.
      • doubleValue

        public final Double doubleValue()

        If this feature uses the double integer variation type, this field contains the double integer value of this variation.

        Returns:
        If this feature uses the double integer variation type, this field contains the double integer value of this variation.
      • longValue

        public final Long longValue()

        If this feature uses the long variation type, this field contains the long value of this variation.

        Returns:
        If this feature uses the long variation type, this field contains the long value of this variation.
      • stringValue

        public final String stringValue()

        If this feature uses the string variation type, this field contains the string value of this variation.

        Returns:
        If this feature uses the string variation type, this field contains the string value of this variation.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromBoolValue

        public static VariableValue fromBoolValue​(Boolean boolValue)
        Create an instance of this class with boolValue() initialized to the given value.

        If this feature uses the Boolean variation type, this field contains the Boolean value of this variation.

        Parameters:
        boolValue - If this feature uses the Boolean variation type, this field contains the Boolean value of this variation.
      • fromDoubleValue

        public static VariableValue fromDoubleValue​(Double doubleValue)
        Create an instance of this class with doubleValue() initialized to the given value.

        If this feature uses the double integer variation type, this field contains the double integer value of this variation.

        Parameters:
        doubleValue - If this feature uses the double integer variation type, this field contains the double integer value of this variation.
      • fromLongValue

        public static VariableValue fromLongValue​(Long longValue)
        Create an instance of this class with longValue() initialized to the given value.

        If this feature uses the long variation type, this field contains the long value of this variation.

        Parameters:
        longValue - If this feature uses the long variation type, this field contains the long value of this variation.
      • fromStringValue

        public static VariableValue fromStringValue​(String stringValue)
        Create an instance of this class with stringValue() initialized to the given value.

        If this feature uses the string variation type, this field contains the string value of this variation.

        Parameters:
        stringValue - If this feature uses the string variation type, this field contains the string value of this variation.