org.jclouds.softlayer.predicates
Class ProductItemPredicates

java.lang.Object
  extended by org.jclouds.softlayer.predicates.ProductItemPredicates

public class ProductItemPredicates
extends Object


Constructor Summary
ProductItemPredicates()
           
 
Method Summary
static com.google.common.base.Predicate<ProductItem> capacity(Float capacity)
          Tests if the ProductItem has the required capacity.
static com.google.common.base.Predicate<ProductItem> categoryCode(String category)
          Tests if the ProductItem contains the required category.
static com.google.common.base.Predicate<ProductItem> categoryCodeMatches(Pattern category)
          Tests if the ProductItem contains a category that matches the supplied Pattern
static com.google.common.base.Predicate<ProductItem> matches(Pattern regex)
          Tests if the ProductItem's description matches the supplied regular expression.
static com.google.common.base.Predicate<ProductItem> units(String units)
          Tests if the ProductItem has the required units.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductItemPredicates

public ProductItemPredicates()
Method Detail

categoryCode

public static com.google.common.base.Predicate<ProductItem> categoryCode(String category)
Tests if the ProductItem contains the required category.

Parameters:
category -
Returns:
true if it does, otherwise false.

categoryCodeMatches

public static com.google.common.base.Predicate<ProductItem> categoryCodeMatches(Pattern category)
Tests if the ProductItem contains a category that matches the supplied Pattern

Parameters:
category -
Returns:
true if it does, otherwise false.

capacity

public static com.google.common.base.Predicate<ProductItem> capacity(Float capacity)
Tests if the ProductItem has the required capacity.

Parameters:
capacity -
Returns:
true if it does, otherwise false.

units

public static com.google.common.base.Predicate<ProductItem> units(String units)
Tests if the ProductItem has the required units.

Parameters:
units -
Returns:
true if it does, otherwise false.

matches

public static com.google.common.base.Predicate<ProductItem> matches(Pattern regex)
Tests if the ProductItem's description matches the supplied regular expression.

Parameters:
regex - a regular expression to match against.
Returns:
true if it does, otherwise false.
Throws:
PatternSyntaxException - if the regex is invalid


Copyright © 2009-2012 jclouds. All Rights Reserved.