public class State
extends java.lang.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 |
---|---|
java.lang.String |
get(java.lang.String name)
Returns the item value of the given name.
|
boolean |
get(java.lang.String name,
boolean defaultValue)
Returns the item value of the given name.
|
int |
get(java.lang.String name,
int defaultValue)
Returns the item value of the given name.
|
java.lang.String |
get(java.lang.String name,
java.lang.String defaultValue)
Returns the item value of the given name.
|
State.Item |
getItem(java.lang.String name)
Returns the state item with the given name.
|
java.util.Iterator<java.lang.String> |
names()
Returns the available names.
|
public State(@Nonnull SlingHttpServletRequest request)
@CheckForNull public java.lang.String get(@Nonnull java.lang.String name)
null
if the
item is not found.name
- the name of the item@Nonnull public java.lang.String get(@Nonnull java.lang.String name, @Nonnull java.lang.String defaultValue)
name
- the name of the itemdefaultValue
- the default valuepublic boolean get(@Nonnull java.lang.String name, boolean defaultValue)
name
- the name of the itemdefaultValue
- the default valuepublic int get(@Nonnull java.lang.String name, int defaultValue)
name
- the name of the itemdefaultValue
- the default value@Nonnull public java.util.Iterator<java.lang.String> names()
@CheckForNull public State.Item getItem(@Nonnull java.lang.String name)
null
if the
item is not found.name
- the name of the itemCopyright © 2010 - 2020 Adobe. All Rights Reserved