Interface FormData.Pair

Enclosing interface:
FormData

public static interface FormData.Pair
A key-value pair that represents a segment of a form data, for example a form field content.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    key()
    Returns a string that represents the form content segment key.
    of(String key, String value)
    Returns the Pair instance for the given key and value.
    default String
    Returns a string that represents the form content segment value or an empty string if the key does not correspond to any value.
  • Method Details

    • of

      static FormData.Pair of(String key, String value)
      Returns the Pair instance for the given key and value.

      The key-value pair that represents a segment of a form data, for example a form field content.

      Parameters:
      key - the form content segment key
      value - the form content segment value. Can be empty if the key does not correspond to any value. For example, an empty form field
      Throws:
      IllegalArgumentException - when key is empty or blank
    • key

      default String key()
      Returns a string that represents the form content segment key.
    • value

      default String value()
      Returns a string that represents the form content segment value or an empty string if the key does not correspond to any value. For example, an empty form field.