> +    * @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 + ")";
> +         }
> +      };

Not enough duplication - I thought about it, but it felt like more hassle to 
have to worry about specifying which port rule was which than to have some very 
braindead dupe code.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/144/files#r6353495

Reply via email to