Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public interface WebFlowScope {
static final Map scopeMap = new HashMap();
Object getAttribute(Object key);
default public Object put(Object key, Object val) {
scopeMap.put(key, val);
return getAttribute(key);
}
default Map getScope() {
return scopeMap;
}
}
static final WebFlowScope scope = (Object key) -> "edited_" + scope.getScope().get(key);
assert scope.put("attribute", "val") == "val";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment