org.jclouds.openstack.v2_0.predicates
Class ExtensionPredicates

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

public class ExtensionPredicates
extends Object

Predicates handy when working with Extensions

Author:
Adrian Cole

Constructor Summary
ExtensionPredicates()
           
 
Method Summary
static com.google.common.base.Predicate<Extension> aliasEquals(String alias)
          matches alias of the given extension
static com.google.common.base.Predicate<Extension> namespaceEquals(URI namespace)
          matches namespace of the given extension
static com.google.common.base.Predicate<Extension> namespaceOrAliasEquals(URI namespace, Collection<URI> namespaceAliases)
          matches namespace of the given extension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionPredicates

public ExtensionPredicates()
Method Detail

namespaceEquals

public static com.google.common.base.Predicate<Extension> namespaceEquals(URI namespace)
matches namespace of the given extension

Parameters:
namespace - ex http://docs.openstack.org/ext/keypairs/api/v1.1
Returns:
predicate that will match namespace of the given extension

aliasEquals

public static com.google.common.base.Predicate<Extension> aliasEquals(String alias)
matches alias of the given extension

Parameters:
alias - ex. os-keypairs
Returns:
predicate that will alias of the given extension

namespaceOrAliasEquals

public static com.google.common.base.Predicate<Extension> namespaceOrAliasEquals(URI namespace,
                                                                                 Collection<URI> namespaceAliases)
matches namespace of the given extension

Parameters:
namespace - ex http://docs.openstack.org/ext/keypairs/api/v1.1
namespacesAliases - Collection of ex http://docs.openstack.org/compute/ext/keypairs/api/v1.1
Returns:
predicate that will match namespace of the given extension


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