org.jclouds.providers
Class ProviderPredicates

java.lang.Object
  extended by org.jclouds.providers.ProviderPredicates

public class ProviderPredicates
extends Object

Container for provider filters (predicates).

Author:
Jeremy Whitlock

Constructor Summary
ProviderPredicates()
           
 
Method Summary
static com.google.common.base.Predicate<ProviderMetadata> all()
          Returns all providers available to jclouds regardless of type.
static com.google.common.base.Predicate<ProviderMetadata> boundedByIso3166Code(String iso3166Code)
          Returns the providers that are bound to the same location as the given ISO 3166 code.
static com.google.common.base.Predicate<ProviderMetadata> id(String id)
          Returns all providers with the given id.
static com.google.common.base.Predicate<ProviderMetadata> intersectingIso3166Code(ProviderMetadata refProviderMetadata)
          Return all providers that have at least one ISO 3166 code in common with the given provider metadata.
static com.google.common.base.Predicate<ProviderMetadata> type(String type)
          Returns all providers with the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderPredicates

public ProviderPredicates()
Method Detail

all

public static com.google.common.base.Predicate<ProviderMetadata> all()
Returns all providers available to jclouds regardless of type.

Returns:
all available providers

id

public static com.google.common.base.Predicate<ProviderMetadata> id(String id)
Returns all providers with the given id.

Parameters:
id - the id of the provider to return
Returns:
the providers with the given id

type

public static com.google.common.base.Predicate<ProviderMetadata> type(String type)
Returns all providers with the given type.

Parameters:
type - the type of the provider to return
Returns:
the providers with the given type

boundedByIso3166Code

public static com.google.common.base.Predicate<ProviderMetadata> boundedByIso3166Code(String iso3166Code)
Returns the providers that are bound to the same location as the given ISO 3166 code.

Parameters:
isoCode - the ISO 3166 code to filter providers by
Returns:
the providers with the given ISO 3166 code

intersectingIso3166Code

public static com.google.common.base.Predicate<ProviderMetadata> intersectingIso3166Code(ProviderMetadata refProviderMetadata)
Return all providers that have at least one ISO 3166 code in common with the given provider metadata.

Parameters:
refProviderMetadata - the provider metadata to use to filter providers by
Returns:
the providers that have at least one ISO 3166 code in common


Copyright © 2009-2011 jclouds. All Rights Reserved.