Class HttpFields.ImmutableHttpFields

java.lang.Object
org.eclipse.jetty.http.HttpFields.ImmutableHttpFields
All Implemented Interfaces:
Iterable<HttpField>, Supplier<HttpFields>, HttpFields
Enclosing interface:
HttpFields

@Deprecated(forRemoval=true) public static class HttpFields.ImmutableHttpFields extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • ImmutableHttpFields

      protected ImmutableHttpFields(HttpField[] fields, int size)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • asImmutable

      public HttpFields asImmutable()
      Description copied from interface: HttpFields

      Returns an immutable copy of this HttpFields instance.

      Specified by:
      asImmutable in interface HttpFields
      Returns:
      a new immutable copy of this HttpFields instance
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • get

      public String get(String name)
      Description copied from interface: HttpFields

      Returns the encoded value of the first field with the given field name, or null if no such field is present.

      The comparison of field name is case-insensitive via HttpField.is(String). If possible, it is more efficient to use HttpFields.get(HttpHeader).

      In case of multi-valued fields, the returned value is the encoded value, including commas and quotes, as returned by HttpField.getValue().

      Specified by:
      get in interface HttpFields
      Parameters:
      name - the case-insensitive field name to search for
      Returns:
      the raw value of the first field with the given field name, or null if no such field is present
      See Also:
    • get

      public String get(HttpHeader header)
      Description copied from interface: HttpFields

      Returns the encoded value of the first field with the given field name, or null if no such header is present.

      In case of multi-valued fields, the returned value is the encoded value, including commas and quotes, as returned by HttpField.getValue().

      Specified by:
      get in interface HttpFields
      Parameters:
      header - the field name to search for
      Returns:
      the raw value of the first field with the given field name, or null if no such header is present
      See Also:
    • getField

      public HttpField getField(HttpHeader header)
      Description copied from interface: HttpFields

      Returns the first HttpField with the given field name, or null if no such field is present.

      Specified by:
      getField in interface HttpFields
      Parameters:
      header - the field name to search for
      Returns:
      the first HttpField with the given field name, or null if no such field is present
    • getField

      public HttpField getField(String name)
      Description copied from interface: HttpFields

      Returns the first HttpField with the given field name, or null if no such field is present.

      The comparison of field name is case-insensitive via HttpField.is(String).

      Specified by:
      getField in interface HttpFields
      Parameters:
      name - the case-insensitive field name to search for
      Returns:
      the first HttpField with the given field name, or null if no such field is present
    • getField

      public HttpField getField(int index)
      Description copied from interface: HttpFields

      Returns the HttpField at the given index, or null if there is no field at the given index.

      Specified by:
      getField in interface HttpFields
      Parameters:
      index - the index of the HttpField
      Returns:
      the HttpField at the given index, or null if there is no field at the given index
    • listIterator

      public ListIterator<HttpField> listIterator(int index)
      Specified by:
      listIterator in interface HttpFields
      Returns:
      an iterator over the HttpFields in this HttpFields starting at the given index.
      See Also:
    • size

      public int size()
      Specified by:
      size in interface HttpFields
      Returns:
      the number of HttpFields in this instance
    • stream

      public Stream<HttpField> stream()
      Specified by:
      stream in interface HttpFields
      Returns:
      a sequential stream of the HttpFields in this instance
    • toString

      public String toString()
      Overrides:
      toString in class Object