Class Fields.Field

java.lang.Object
org.eclipse.jetty.util.Fields.Field
Enclosing class:
Fields

public static class Fields.Field extends Object

A named list of string values.

The name is case-sensitive and there must be at least one value.

  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getName

      public String getName()
      Returns:
      the field's name
    • getValue

      public String getValue()
      Returns:
      the first field's value
    • getValueAsInt

      public Integer getValueAsInt()

      Attempts to convert the result of getValue() to an integer, returning it if the conversion is successful; returns null if the result of getValue() is null.

      Returns:
      the result of getValue() converted to an integer, or null
      Throws:
      NumberFormatException - if the conversion fails
    • getValues

      public List<String> getValues()
      Returns:
      the field's values
    • hasMultipleValues

      public boolean hasMultipleValues()
      Returns:
      whether the field has multiple values
    • toString

      public String toString()
      Overrides:
      toString in class Object