> + * @return predicate that matches endPort
> + */
> + public static Predicate<SecurityGroupRule> ruleEndPort(final int endPort)
> {
> + checkNotNull(endPort, "endPort must be defined");
> +
> + return new Predicate<SecurityGroupRule>() {
> + @Override
> + public boolean apply(SecurityGroupRule ext) {
> + return endPort == ext.getToPort();
> + }
> +
> + @Override
> + public String toString() {
> + return "ruleEndPort(" + endPort + ")";
> + }
> + };
Worth combining the start and end port rules into a "portRule", or not enough
duplication to worry about that..?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/144/files#r6344745