Class Fields

  • All Implemented Interfaces:
    java.lang.Iterable<Fields.Field>

    @Deprecated(since="2021-05-27")
    public class Fields
    extends java.lang.Object
    implements java.lang.Iterable<Fields.Field>
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

    A container for name/value pairs, known as fields.

    A Fields.Field is composed of a name string that can be case-sensitive or case-insensitive (by specifying the option at the constructor) and of a case-sensitive set of value strings.

    The implementation of this class is not thread safe.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Fields.Field
      Deprecated.
      The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    • Constructor Summary

      Constructors 
      Constructor Description
      Fields()
      Deprecated.
      Creates an empty, modifiable, case insensitive Fields instance.
      Fields​(boolean caseSensitive)
      Deprecated.
      Creates an empty, modifiable, case insensitive Fields instance.
      Fields​(Fields original, boolean immutable)
      Deprecated.
      Creates a Fields instance by copying the fields from the given Fields and making it (im)mutable depending on the given immutable parameter
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(java.lang.String name, java.lang.String value)
      Deprecated.
      Adds the given value to a field with the given name, creating a Fields.Field is none exists for the given name.
      void clear()
      Deprecated.
      Empties this Fields instance from all fields
      boolean equals​(java.lang.Object obj)
      Deprecated.
       
      Fields.Field get​(java.lang.String name)
      Deprecated.
       
      java.util.Set<java.lang.String> getNames()
      Deprecated.
       
      int getSize()
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      boolean isEmpty()
      Deprecated.
       
      java.util.Iterator<Fields.Field> iterator()
      Deprecated.
       
      void put​(java.lang.String name, java.lang.String value)
      Deprecated.
      Inserts or replaces the given name/value pair as a single-valued Fields.Field.
      void put​(Fields.Field field)
      Deprecated.
      Inserts or replaces the given Fields.Field, mapped to the field's name
      Fields.Field remove​(java.lang.String name)
      Deprecated.
      Removes the Fields.Field with the given name
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Fields

        public Fields​(boolean caseSensitive)
        Deprecated.

        Creates an empty, modifiable, case insensitive Fields instance.

        Parameters:
        caseSensitive - whether this Fields instance must be case sensitive
        See Also:
        Fields(Fields, boolean)
      • Fields

        public Fields​(Fields original,
                      boolean immutable)
        Deprecated.

        Creates a Fields instance by copying the fields from the given Fields and making it (im)mutable depending on the given immutable parameter

        Parameters:
        original - the Fields to copy fields from
        immutable - whether this instance is immutable
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • getNames

        public java.util.Set<java.lang.String> getNames()
        Deprecated.
        Returns:
        a set of field names
      • get

        public Fields.Field get​(java.lang.String name)
        Deprecated.
        Parameters:
        name - the field name
        Returns:
        the Fields.Field with the given name, or null if no such field exists
      • put

        public void put​(java.lang.String name,
                        java.lang.String value)
        Deprecated.

        Inserts or replaces the given name/value pair as a single-valued Fields.Field.

        Parameters:
        name - the field name
        value - the field value
      • add

        public void add​(java.lang.String name,
                        java.lang.String value)
        Deprecated.

        Adds the given value to a field with the given name, creating a Fields.Field is none exists for the given name.

        Parameters:
        name - the field name
        value - the field value to add
      • remove

        public Fields.Field remove​(java.lang.String name)
        Deprecated.

        Removes the Fields.Field with the given name

        Parameters:
        name - the name of the field to remove
        Returns:
        the removed field, or null if no such field existed
      • clear

        public void clear()
        Deprecated.

        Empties this Fields instance from all fields

        See Also:
        isEmpty()
      • isEmpty

        public boolean isEmpty()
        Deprecated.
        Returns:
        whether this Fields instance is empty
      • getSize

        public int getSize()
        Deprecated.
        Returns:
        the number of fields
      • iterator

        public java.util.Iterator<Fields.Field> iterator()
        Deprecated.
        Specified by:
        iterator in interface java.lang.Iterable<Fields.Field>
        Returns:
        an iterator over the Fields.Fields present in this instance
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object