org.jclouds.openstack.v2_0.predicates
Class LinkPredicates

java.lang.Object
  extended by org.jclouds.openstack.v2_0.predicates.LinkPredicates

public class LinkPredicates
extends Object

Predicates handy when working with Link Types

Author:
Adrian Cole

Constructor Summary
LinkPredicates()
           
 
Method Summary
static com.google.common.base.Predicate<Link> hrefEquals(URI href)
          matches links of the given href
static com.google.common.base.Predicate<Link> relationEquals(Link.Relation rel)
          matches links of the given relation
static com.google.common.base.Predicate<Link> typeEquals(String type)
          matches links of the given type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkPredicates

public LinkPredicates()
Method Detail

relationEquals

public static com.google.common.base.Predicate<Link> relationEquals(Link.Relation rel)
matches links of the given relation

Parameters:
rel - relation of the link
Returns:
predicate that will match links of the given rel

hrefEquals

public static com.google.common.base.Predicate<Link> hrefEquals(URI href)
matches links of the given href

Parameters:
href -
Returns:
predicate that will match links of the given href

typeEquals

public static com.google.common.base.Predicate<Link> typeEquals(String type)
matches links of the given type

Parameters:
type - ex. application/pdf
Returns:
predicate that will match links of the given type


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.