|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Stateful
Has state that can be set, copied and checked for deep equality.
Stateful encapsulates management of an object whose state may change,
defining methods for
| Method Summary | |
|---|---|
Stateful |
copyState()
Create a copy of the Stateful. |
void |
setState(java.lang.Object src)
Set state based on src. |
boolean |
stateEquals(Stateful s)
Does the other Stateful have the same state? |
java.lang.Object |
stateStamp()
Return a value guaranteeing that any instance with the same value has the same state. |
java.lang.Object |
updateStateStamp()
Create a new value for return by stateStamp(). |
| Methods inherited from interface facets.util.Titled |
|---|
title |
| Method Detail |
|---|
void setState(java.lang.Object src)
src.
src - must be non-null and interpretable by the implementation
as state information; it will usually be another instance of the
Stateful's class.Stateful copyState()
Stateful.
Return one of:
Stateful suitable for passing to setStateStateful itself to enable such a copy to be creatednull to signal that the Stateful has
in fact no settable state
boolean stateEquals(Stateful s)
Stateful have the same state?
Allows deep checking to be implemented where doing so in
Object.equals(Object) is too expensive.
s - to comparejava.lang.Object updateStateStamp()
stateStamp().
java.lang.Object stateStamp()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||