@Immutable public class RequestFieldDataMultiValue extends AbstractRequestFieldData
For single value class,
Serialized Form| Constructor and Description |
|---|
RequestFieldDataMultiValue(RequestFieldDataMultiValue aRF)
Copy constructor
|
RequestFieldDataMultiValue(String sFieldName)
Create a new request field that has no default value
|
RequestFieldDataMultiValue(String sFieldName,
Collection<String> aDefaultValues)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
com.helger.commons.collection.impl.ICommonsList<String> |
getDefaultValues() |
com.helger.commons.collection.impl.ICommonsList<String> |
getRequestValues()
Get the value of the request - optionally falling back to the provided
default value if no such request parameter is present
|
protected com.helger.commons.collection.impl.ICommonsList<String> |
getRequestValuesWithoutDefault()
Helper method to get the request value without falling back to the provided
default value.
|
int |
hashCode() |
boolean |
hasRequestValues(Collection<String> aExpectedValues)
Utility method that checks if the passed expected value matches the request
parameter (considering the fallback mechanism)
|
String |
toString() |
getFieldName, getParamspublic RequestFieldDataMultiValue(@Nonnull RequestFieldDataMultiValue aRF)
aRF - The request field to copy the values from. May not be
null.public RequestFieldDataMultiValue(@Nonnull @Nonempty String sFieldName)
sFieldName - The field name to use. May neither be null nor empty.public RequestFieldDataMultiValue(@Nonnull @Nonempty String sFieldName, @Nullable Collection<String> aDefaultValues)
sFieldName - The field name to use. May neither be null nor empty.aDefaultValues - The default values to use, if no value is present in the request
scope.@Nonnull @ReturnsMutableCopy @OverrideOnDemand public com.helger.commons.collection.impl.ICommonsList<String> getDefaultValues()
null but an empty list if no default value is
available.@Nullable protected final com.helger.commons.collection.impl.ICommonsList<String> getRequestValuesWithoutDefault()
null if no such request value is present@Nonnull public final com.helger.commons.collection.impl.ICommonsList<String> getRequestValues()
public final boolean hasRequestValues(@Nonnull Collection<String> aExpectedValues)
aExpectedValues - The list of expected values. 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.