Class Fields
- All Implemented Interfaces:
Iterable<Fields.Field>
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 ClassesModifier and TypeClassDescriptionstatic classDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Adds the given value to a field with the given name, creating aFields.Fieldis none exists for the given name.voidclear()Deprecated.Empties thisFieldsinstance from all fieldsbooleanDeprecated.Deprecated.getNames()Deprecated.intgetSize()Deprecated.inthashCode()Deprecated.booleanisEmpty()Deprecated.iterator()Deprecated.voidDeprecated.Inserts or replaces the given name/value pair as a single-valuedFields.Field.voidput(Fields.Field field) Deprecated.Inserts or replaces the givenFields.Field, mapped to thefield's nameDeprecated.Removes theFields.Fieldwith the given nametoString()Deprecated.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Fields
public Fields()Deprecated.Creates an empty, modifiable, case insensitive
Fieldsinstance.- See Also:
-
Fields
public Fields(boolean caseSensitive) Deprecated.Creates an empty, modifiable, case insensitive
Fieldsinstance.- Parameters:
caseSensitive- whether thisFieldsinstance must be case sensitive- See Also:
-
Fields
Deprecated.Creates a
Fieldsinstance by copying the fields from the givenFieldsand making it (im)mutable depending on the givenimmutableparameter- Parameters:
original- theFieldsto copy fields fromimmutable- whether this instance is immutable
-
-
Method Details
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
getNames
Deprecated.- Returns:
- a set of field names
-
get
Deprecated.- Parameters:
name- the field name- Returns:
- the
Fields.Fieldwith the given name, or null if no such field exists
-
put
Deprecated.Inserts or replaces the given name/value pair as a single-valued
Fields.Field.- Parameters:
name- the field namevalue- the field value
-
put
Deprecated.Inserts or replaces the given
Fields.Field, mapped to thefield's name- Parameters:
field- the field to put
-
add
Deprecated.Adds the given value to a field with the given name, creating a
Fields.Fieldis none exists for the given name.- Parameters:
name- the field namevalue- the field value to add
-
remove
Deprecated.Removes the
Fields.Fieldwith 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
Fieldsinstance from all fields- See Also:
-
isEmpty
public boolean isEmpty()Deprecated.- Returns:
- whether this
Fieldsinstance is empty
-
getSize
public int getSize()Deprecated.- Returns:
- the number of fields
-
iterator
Deprecated.- Specified by:
iteratorin interfaceIterable<Fields.Field>- Returns:
- an iterator over the
Fields.Fields present in this instance
-
toString
Deprecated.
-