public class EntityPredicates extends Object
EntityType
collections.Constructor and Description |
---|
EntityPredicates() |
Modifier and Type | Method and Description |
---|---|
static <T extends Entity> |
hrefEquals(URI href)
Matches
entities with the given URI . |
static <T extends Entity> |
idEquals(String id)
Matches
entities with the given id. |
static <T extends Entity> |
nameEquals(String name)
Matches
entities with the given name. |
static <T extends Entity> |
nameIn(Iterable<String> names)
Matches
entities with names in the given collection. |
static <T extends Entity> |
nameStartsWith(String prefix)
Matches
entities with names starting with the given prefix. |
static <T extends Entity> |
typeEquals(String type)
Matches
entities of the given type. |
public static <T extends Entity> com.google.common.base.Predicate<T> idEquals(String id)
entities
with the given id.T
- type of the entity, for example Vm
id
- value of the id attribute of the entitypublic static <T extends Entity> com.google.common.base.Predicate<T> nameEquals(String name)
entities
with the given name.T
- type of the entity, for example Vm
name
- value of the name attribute of the entitypublic static <T extends Entity> com.google.common.base.Predicate<T> nameStartsWith(String prefix)
entities
with names starting with the given prefix.T
- type of the entity, for example Vm
name
- prefix of the name attribute of the entitypublic static <T extends Entity> com.google.common.base.Predicate<T> nameIn(Iterable<String> names)
entities
with names in the given collection.T
- type of the entity, for example Vm
names
- collection of values for the name attribute of the entitypublic static <T extends Entity> com.google.common.base.Predicate<T> typeEquals(String type)
entities
of the given type.T
- type of the entity, for example Vm
type
- the media type string of the entity, for example VCloudDirectorMediaType#CATALOG
VCloudDirectorMediaType
public static <T extends Entity> com.google.common.base.Predicate<T> hrefEquals(URI href)
entities
with the given URI
.T
- type of the entity, for example Vm
href
- the URI of the entityVCloudDirectorMediaType
Copyright © 2009-2013 jclouds. All Rights Reserved.