Package org.jclouds.providers
Class ProviderPredicates
java.lang.Object
org.jclouds.providers.ProviderPredicates
Container for provider filters (predicates).
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.base.Predicate<ProviderMetadata> all()Returns all providers available to jclouds regardless of type.static com.google.common.base.Predicate<ProviderMetadata> apiMetadataAssignableFrom(com.google.common.reflect.TypeToken<? extends ApiMetadata> apiClass) Returns all providers with an apimetadata assignable from the given api.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> contextAssignableFrom(com.google.common.reflect.TypeToken<? extends Context> type) Returns all providers with an context assignable from the given type.static com.google.common.base.Predicate<ProviderMetadata> 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> viewableAs(com.google.common.reflect.TypeToken<? extends View> type) Returns all providers with an context transformable to the given type. 
- 
Constructor Details
- 
ProviderPredicates
public ProviderPredicates() 
 - 
 - 
Method Details
- 
all
Returns all providers available to jclouds regardless of type.- Returns:
 - all available providers
 
 - 
id
Returns all providers with the given id.- Parameters:
 id- the id of the provider to return- Returns:
 - the providers with the given id
 
 - 
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
 
 - 
apiMetadataAssignableFrom
public static com.google.common.base.Predicate<ProviderMetadata> apiMetadataAssignableFrom(com.google.common.reflect.TypeToken<? extends ApiMetadata> apiClass) Returns all providers with an apimetadata assignable from the given api.- Parameters:
 apiClass- the api of the provider to return- Returns:
 - the providers with an apimetadata assignable from the given api.
 
 - 
contextAssignableFrom
public static com.google.common.base.Predicate<ProviderMetadata> contextAssignableFrom(com.google.common.reflect.TypeToken<? extends Context> type) Returns all providers with an context assignable from the given type.- Parameters:
 type- the context of the provider to return- Returns:
 - the providers with an context assignable from the given type.
 
 - 
viewableAs
public static com.google.common.base.Predicate<ProviderMetadata> viewableAs(com.google.common.reflect.TypeToken<? extends View> type) Returns all providers with an context transformable to the given type.- Parameters:
 type- the context you wish to achieve ex.BlobStoreContext- Returns:
 - the providers with an context transformable to from the given type.
 
 
 -