T
- type of traversable resourcepublic interface Traversable<T>
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<T> |
findAncestor(com.google.common.base.Predicate<T> predicate)
Find the first ancestor resource that matches the given predicate condition.
|
com.google.common.base.Optional<T> |
findAncestor(com.google.common.base.Predicate<T> predicate,
boolean excludeCurrentResource)
Find the first ancestor resource that matches the given predicate condition.
|
com.google.common.base.Optional<T> |
findAncestorWithProperty(String propertyName)
Find the first ancestor resource containing the given property name.
|
com.google.common.base.Optional<T> |
findAncestorWithProperty(String propertyName,
boolean excludeCurrentResource)
Find the first ancestor resource containing the given property name.
|
<V> com.google.common.base.Optional<T> |
findAncestorWithPropertyValue(String propertyName,
V propertyValue)
Find the first ancestor resource where the given property name has the specified value.
|
<V> com.google.common.base.Optional<T> |
findAncestorWithPropertyValue(String propertyName,
V propertyValue,
boolean excludeCurrentResource)
Find the first ancestor resource where the given property name has the specified value.
|
List<T> |
findDescendants(com.google.common.base.Predicate<T> predicate)
Get a list of descendant resources that match the given predicate condition.
|
com.google.common.base.Optional<T> findAncestor(com.google.common.base.Predicate<T> predicate)
predicate
- predicate to match ancestor resources againstOptional
resource that matches the predicate conditioncom.google.common.base.Optional<T> findAncestor(com.google.common.base.Predicate<T> predicate, boolean excludeCurrentResource)
predicate
- predicate to match ancestor resources againstexcludeCurrentResource
- if true, the current resource will be excluded (i.e. even if the current resource
matches the predicate criteria, it will not be returned)Optional
resource that matches the predicate conditioncom.google.common.base.Optional<T> findAncestorWithProperty(String propertyName)
propertyName
- property name to find on ancestor resourcesOptional
resource that contains the propertycom.google.common.base.Optional<T> findAncestorWithProperty(String propertyName, boolean excludeCurrentResource)
propertyName
- property name to find on ancestor resourcesexcludeCurrentResource
- if true, the current resource will be excluded (i.e. even if the current resource
matches the predicate criteria, it will not be returned)Optional
resource that contains the property<V> com.google.common.base.Optional<T> findAncestorWithPropertyValue(String propertyName, V propertyValue)
V
- type of valuepropertyName
- property name to find on ancestor resourcespropertyValue
- value of named property to matchOptional
resource that contains the property value<V> com.google.common.base.Optional<T> findAncestorWithPropertyValue(String propertyName, V propertyValue, boolean excludeCurrentResource)
V
- type of valuepropertyName
- property name to find on ancestor resourcespropertyValue
- value of named property to matchexcludeCurrentResource
- if true, the current resource will be excluded (i.e. even if the current resource
matches the predicate criteria, it will not be returned)Optional
resource that contains the property valueList<T> findDescendants(com.google.common.base.Predicate<T> predicate)
predicate
- predicate to match descendant resources againstCopyright © 2019 ICF Next. All rights reserved.