Skip to content

Instantly share code, notes, and snippets.

@runeflobakk
Created October 18, 2011 22:06
Show Gist options
  • Save runeflobakk/1296876 to your computer and use it in GitHub Desktop.
Save runeflobakk/1296876 to your computer and use it in GitHub Desktop.
Funksjon som sjekker om ConfigAttributes støttes av en AccessDecisionVoter.
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