Package zendesk.support.suas
Class State
- java.lang.Object
-
- zendesk.support.suas.State
-
- All Implemented Interfaces:
- java.io.Serializable
public class State extends java.lang.Object implements java.io.Serializable
An implementation of state that's used in aSuasStore
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description State()
Create a new and empty state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
equals(java.lang.Object o)
<E> E
getState(java.lang.Class<E> clazz)
Get a state for aClass
java.lang.Object
getState(java.lang.String stateKey)
Get a state for a state key<E> E
getState(java.lang.String stateKey, java.lang.Class<E> clazz)
Get a state for the a state key of the type<E>
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getState
public java.lang.Object getState(java.lang.String stateKey)
Get a state for a state key- Parameters:
stateKey
- state key- Returns:
- not typed state
-
getState
public <E> E getState(java.lang.Class<E> clazz)
Get a state for aClass
If available in the state returns a the state with type
<E>
- Parameters:
clazz
- type of the state- Returns:
- the state with the correct type or
null
-
getState
public <E> E getState(java.lang.String stateKey, java.lang.Class<E> clazz)
Get a state for the a state key of the type<E>
If available in the state returns a the state with type
<E>
- Parameters:
stateKey
- key for the stateclazz
- type of the state- Returns:
- the state with the correct type or
null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-