Created
March 19, 2014 19:57
-
-
Save danveloper/9649954 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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