@Immutable public class RequestFieldData extends AbstractRequestFieldData
for multi value data,
Serialized Form| Constructor and Description |
|---|
RequestFieldData(RequestFieldData aRF)
Copy constructor
|
RequestFieldData(String sFieldName)
Create a new request field that has no default value
|
RequestFieldData(String sFieldName,
String sDefaultValue)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDefaultValue() |
String |
getRequestValue()
Get the value of the request - optionally falling back to the provided
default value if no such request parameter is present
|
protected String |
getRequestValueWithoutDefault()
Helper method to get the request value without falling back to the provided
default value.
|
int |
hashCode() |
boolean |
hasRequestValue(String sExpectedValue)
Utility method that checks if the passed expected value matches the request
parameter (considering the fallback mechanism)
|
String |
toString() |
getFieldName, getParamspublic RequestFieldData(@Nonnull RequestFieldData aRF)
aRF - The request field to copy the values from. May not be
null.public RequestFieldData(@Nonnull @Nonempty String sFieldName)
sFieldName - The field name to use. May neither be null nor empty.@Nonnull @OverrideOnDemand public String getDefaultValue()
null but an empty string if no default value is
available.@Nullable protected final String getRequestValueWithoutDefault()
null if no such request value is present@Nonnull public final String getRequestValue()
public final boolean hasRequestValue(@Nonnull String sExpectedValue)
sExpectedValue - The expected value. May not be null.true if the passed value equals the actual request
valuepublic boolean equals(Object o)
equals in class AbstractRequestFieldDatapublic int hashCode()
hashCode in class AbstractRequestFieldDatapublic String toString()
toString in class AbstractRequestFieldDataCopyright © 2014–2019 Philip Helger. All rights reserved.