@ThreadSafe public final class PageParametersX extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
SPLIT_ON_BAR_PATTERN
A pattern that splits on vertical bars '|'.
|
Modifier and Type | Method and Description |
---|---|
static PageParameters |
copyOrNew(PageParameters pP)
Constructs a PageParameters, copying its state from pP if it is not null.
|
static String |
getString(PageParameters pP,
String name)
Returns the value of the specified parameter as a string.
|
static String |
getStringNonEmpty(PageParameters pP,
String name)
Returns the null or non-empty value of the specified parameter as a string.
|
static String |
getStringRequired(PageParameters pP,
String name)
Returns the non-null, non-empty value of the specified parameter as a string.
|
static Set<String> |
splitAsSet(String value,
Pattern pattern)
Splits the specified value into a set of strings, separated by the given pattern.
|
static PageParameters |
withSet(PageParameters pP,
String name,
String value)
Returns the specified page parameters (p) with a new value set.
|
public static final Pattern SPLIT_ON_BAR_PATTERN
public static PageParameters copyOrNew(PageParameters pP)
public static final String getString(PageParameters pP, String name)
p.get(name).toString()
.public static final String getStringNonEmpty(PageParameters pP, String name)
VotorolaRuntimeException
- if the value is the empty string "".HTTPServletRequestX.getParameterNonEmpty(String,javax.servlet.ServletRequest)
public static final String getStringRequired(PageParameters pP, String name)
VotorolaRuntimeException
- if the value is either null, or the empty
string "".HTTPServletRequestX.getParameterRequired(String,javax.servlet.ServletRequest)
public static Set<String> splitAsSet(String value, Pattern pattern)
public static PageParameters withSet(PageParameters pP, String name, String value)
pP
- the parameters, which may be null.value
- the value to set. If null, then this method is a no-op.