class AttributeSource {
/**
* Captures the state of all Attributes. The return value can be passed to
* {@link #restoreState} to restore the state of this or another AttributeSource.
*/
public State captureState() {
if (!hasAttributes()) {
return null;
}
if (currentState == null) {
computeCurrentState();
}
return (State) this.currentState.clone();
}
}