public class State extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
State.Item
An item in the state.
|
Constructor and Description |
---|
State(SlingHttpServletRequest request) |
Modifier and Type | Method and Description |
---|---|
String |
get(String name)
Returns the item value of the given name.
|
boolean |
get(String name,
boolean defaultValue)
Returns the item value of the given name.
|
int |
get(String name,
int defaultValue)
Returns the item value of the given name.
|
String |
get(String name,
String defaultValue)
Returns the item value of the given name.
|
State.Item |
getItem(String name)
Returns the state item with the given name.
|
Iterator<String> |
names()
Returns the available names.
|
public State(@Nonnull SlingHttpServletRequest request)
@CheckForNull public String get(@Nonnull String name)
null
if the
item is not found.name
- the name of the item@Nonnull public String get(@Nonnull String name, @Nonnull String defaultValue)
name
- the name of the itemdefaultValue
- the default valuepublic boolean get(@Nonnull String name, boolean defaultValue)
name
- the name of the itemdefaultValue
- the default valuepublic int get(@Nonnull String name, int defaultValue)
name
- the name of the itemdefaultValue
- the default value@Nonnull public Iterator<String> names()
@CheckForNull public State.Item getItem(@Nonnull String name)
null
if the
item is not found.name
- the name of the itemCopyright © 2010 - 2020 Adobe. All Rights Reserved