Package org.eclipse.jetty.util
Class Fields.Field
- java.lang.Object
-
- org.eclipse.jetty.util.Fields.Field
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)booleanequals(Fields.Field that, boolean caseSensitive)StringgetName()StringgetValue()IntegergetValueAsInt()Attempts to convert the result ofgetValue()to an integer, returning it if the conversion is successful; returns null if the result ofgetValue()is null.List<String>getValues()inthashCode()booleanhasMultipleValues()StringtoString()
-
-
-
Method Detail
-
equals
public boolean equals(Fields.Field that, boolean caseSensitive)
-
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 ofgetValue()is null.- Returns:
- the result of
getValue()converted to an integer, or null - Throws:
NumberFormatException- if the conversion fails
-
hasMultipleValues
public boolean hasMultipleValues()
- Returns:
- whether the field has multiple values
-
-