org.jclouds.apis
Class ApiPredicates

java.lang.Object
  extended by org.jclouds.apis.ApiPredicates

public class ApiPredicates
extends Object

Container for api filters (predicates).

Author:
Jeremy Whitlock

Constructor Summary
ApiPredicates()
           
 
Method Summary
static com.google.common.base.Predicate<ApiMetadata> all()
          Returns all apis available to jclouds regardless of type.
static com.google.common.base.Predicate<RestApiMetadata> apiAssignableFrom(com.google.common.reflect.TypeToken<?> type)
          Returns all apis with the given type.
static com.google.common.base.Predicate<ApiMetadata> contextAssignableFrom(com.google.common.reflect.TypeToken<?> type)
          Returns all apis who's contexts are assignable from the parameter
static com.google.common.base.Predicate<ApiMetadata> id(String id)
          Returns all apis with the given id.
static com.google.common.base.Predicate<ApiMetadata> viewableAs(com.google.common.reflect.TypeToken<?> type)
          Returns all apis who's contexts are transformable to the parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApiPredicates

public ApiPredicates()
Method Detail

all

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

Returns:
all available apis

id

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

Parameters:
id - the id of the api to return
Returns:
the apis with the given id

apiAssignableFrom

public static com.google.common.base.Predicate<RestApiMetadata> apiAssignableFrom(com.google.common.reflect.TypeToken<?> type)
Returns all apis with the given type.

Parameters:
type - the type of the api to return
Returns:
the apis with the given type

contextAssignableFrom

public static com.google.common.base.Predicate<ApiMetadata> contextAssignableFrom(com.google.common.reflect.TypeToken<?> type)
Returns all apis who's contexts are assignable from the parameter

Parameters:
type - the type of the context to search for
Returns:
the apis with contexts assignable from given type

viewableAs

public static com.google.common.base.Predicate<ApiMetadata> viewableAs(com.google.common.reflect.TypeToken<?> type)
Returns all apis who's contexts are transformable to the parameter

Parameters:
type - the type of the context to search for
Returns:
the apis with contexts transformable to the given type


Copyright © 2009-2013 jclouds. All Rights Reserved.