Class FieldParsedParameterList
java.lang.Object
name.matthewgreet.strutscommons.util.FieldParsedParameterList
- All Implemented Interfaces:
Serializable
The list of parsed HTTP parameters that apply to a field. Entries are expected to be either all non-indexed, or
all uniquely indexed. When adding indexed entries, indices need not start at zero or be consecutive but cannot
already exist, be less than zero, or exceed maximum size.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddParsedParameter(ParsedParameter parsedParameter) voidReduces list to first entry where only single value is expected.protected voidensureListIndex(int index) Ensures index exists in list by adding null entries till it does.booleanReturns whether list contains indexed parameter names.intReturns copy of parameter values of entire list with missing entries replaced by empty string.Returns copy of entire list with missing entries replaced by fake parameter of empty string.Returns parameter value of first entry, or empty string if no entries.Returns first entry, or fake parsed parameter using empty string if no entries.intgetSize()Returns number of parameters, whether real or fake placeholders.toString()
-
Constructor Details
-
FieldParsedParameterList
-
-
Method Details
-
ensureListIndex
protected void ensureListIndex(int index) Ensures index exists in list by adding null entries till it does. -
addParsedParameter
-
convertToSingleValue
public void convertToSingleValue()Reduces list to first entry where only single value is expected. -
getFieldName
-
getHasIndexed
public boolean getHasIndexed()Returns whether list contains indexed parameter names. -
getMultipleParameterValues
Returns copy of parameter values of entire list with missing entries replaced by empty string. Used for array or collection form fields. -
getMultipleValues
Returns copy of entire list with missing entries replaced by fake parameter of empty string. Used for array or collection form fields. -
getMaxListSize
public int getMaxListSize() -
getSingleParameterValue
Returns parameter value of first entry, or empty string if no entries. Used for single value form fields. -
getSingleValue
Returns first entry, or fake parsed parameter using empty string if no entries. Used for single value form fields. -
getSize
public int getSize()Returns number of parameters, whether real or fake placeholders. -
toString
-