public class EntityPredicates
extends java.lang.Object
Constructor and Description |
---|
EntityPredicates() |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Predicate<Entity> |
applicationIdEqualTo(java.lang.String val) |
static com.google.common.base.Predicate<Entity> |
applicationIdSatisfies(com.google.common.base.Predicate<? super java.lang.String> condition) |
static <T> com.google.common.base.Predicate<Entity> |
attributeEqualTo(AttributeSensor<T> attribute,
T val) |
static <T> com.google.common.base.Predicate<Entity> |
attributeNotEqualTo(AttributeSensor<T> attribute,
T val) |
static <T> com.google.common.base.Predicate<Entity> |
attributeSatisfies(AttributeSensor<T> attribute,
com.google.common.base.Predicate<T> condition) |
static <T> com.google.common.base.Predicate<Entity> |
configEqualTo(ConfigKey.HasConfigKey<T> configKey,
T val) |
static <T> com.google.common.base.Predicate<Entity> |
configEqualTo(ConfigKey<T> configKey,
T val) |
static <T> com.google.common.base.Predicate<Entity> |
configSatisfies(ConfigKey.HasConfigKey<T> configKey,
com.google.common.base.Predicate<T> condition) |
static <T> com.google.common.base.Predicate<Entity> |
configSatisfies(ConfigKey<T> configKey,
com.google.common.base.Predicate<T> condition) |
static com.google.common.base.Predicate<Entity> |
displayNameEqualTo(java.lang.String val) |
static com.google.common.base.Predicate<Entity> |
displayNameMatches(java.lang.String regex)
Deprecated.
since 0.7.0 use
displayNameSatisfies(Predicate) to clarify this is *regex* matching
(passing StringPredicates.matchesRegex(String) as the predicate) |
static com.google.common.base.Predicate<Entity> |
displayNameSatisfies(com.google.common.base.Predicate<? super java.lang.String> condition) |
static com.google.common.base.Predicate<Entity> |
hasInterfaceMatching(java.lang.String typeRegex) |
static com.google.common.base.Predicate<Entity> |
idEqualTo(java.lang.String val) |
static com.google.common.base.Predicate<Entity> |
idSatisfies(com.google.common.base.Predicate<? super java.lang.String> condition) |
static com.google.common.base.Predicate<Entity> |
isChildOf(Entity parent)
Returns a predicate that determines if a given entity is a direct child of this
parent . |
static <T> com.google.common.base.Predicate<Entity> |
isManaged() |
static com.google.common.base.Predicate<Entity> |
isMemberOf(Group group) |
static <T> com.google.common.base.Predicate<Entity> |
locationsIncludes(Location location)
Create a predicate that matches any entity who has an exact match for the given location
(i.e.
|
static <T> com.google.common.base.Predicate<Entity> |
locationsSatisfy(com.google.common.base.Predicate<java.util.Collection<Location>> condition) |
static <T> com.google.common.base.Predicate<Entity> |
managed()
Deprecated.
since 0.7.0 use
isManaged() |
static <T> com.google.common.base.Predicate<Entity> |
withLocation(Location location)
Deprecated.
since 0.7.0 use
locationsIncludes(Location) |
public static com.google.common.base.Predicate<Entity> idEqualTo(java.lang.String val)
public static com.google.common.base.Predicate<Entity> idSatisfies(com.google.common.base.Predicate<? super java.lang.String> condition)
public static com.google.common.base.Predicate<Entity> displayNameEqualTo(java.lang.String val)
public static com.google.common.base.Predicate<Entity> displayNameSatisfies(com.google.common.base.Predicate<? super java.lang.String> condition)
public static com.google.common.base.Predicate<Entity> displayNameMatches(java.lang.String regex)
displayNameSatisfies(Predicate)
to clarify this is *regex* matching
(passing StringPredicates.matchesRegex(String)
as the predicate)public static com.google.common.base.Predicate<Entity> applicationIdEqualTo(java.lang.String val)
public static com.google.common.base.Predicate<Entity> applicationIdSatisfies(com.google.common.base.Predicate<? super java.lang.String> condition)
public static <T> com.google.common.base.Predicate<Entity> attributeEqualTo(AttributeSensor<T> attribute, T val)
public static <T> com.google.common.base.Predicate<Entity> attributeSatisfies(AttributeSensor<T> attribute, com.google.common.base.Predicate<T> condition)
public static <T> com.google.common.base.Predicate<Entity> attributeNotEqualTo(AttributeSensor<T> attribute, T val)
public static <T> com.google.common.base.Predicate<Entity> configEqualTo(ConfigKey<T> configKey, T val)
public static <T> com.google.common.base.Predicate<Entity> configSatisfies(ConfigKey<T> configKey, com.google.common.base.Predicate<T> condition)
public static <T> com.google.common.base.Predicate<Entity> configEqualTo(ConfigKey.HasConfigKey<T> configKey, T val)
public static <T> com.google.common.base.Predicate<Entity> configSatisfies(ConfigKey.HasConfigKey<T> configKey, com.google.common.base.Predicate<T> condition)
public static com.google.common.base.Predicate<Entity> hasInterfaceMatching(java.lang.String typeRegex)
typeRegex
- a regular expressionpublic static com.google.common.base.Predicate<Entity> isChildOf(Entity parent)
parent
.public static <T> com.google.common.base.Predicate<Entity> locationsIncludes(Location location)
entity.getLocations().contains(location)
).public static <T> com.google.common.base.Predicate<Entity> locationsSatisfy(com.google.common.base.Predicate<java.util.Collection<Location>> condition)
@Deprecated public static <T> com.google.common.base.Predicate<Entity> withLocation(Location location)
locationsIncludes(Location)
public static <T> com.google.common.base.Predicate<Entity> isManaged()
@Deprecated public static <T> com.google.common.base.Predicate<Entity> managed()
isManaged()