Created
October 18, 2011 22:06
-
-
Save runeflobakk/1296876 to your computer and use it in GitHub Desktop.
Funksjon som sjekker om ConfigAttributes støttes av en AccessDecisionVoter.
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 class SupportedBy implements Predicate<ConfigAttribute> { | |
private final AccessDecisionVoter voter; | |
public SupportedBy(AccessDecisionVoter voter) { | |
this.voter = voter; | |
} | |
public boolean evaluate(ConfigAttribute attribute) { | |
return voter.supports(attribute); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment