Package com.evolveum.midpoint.prism
Interface Walkable
- All Known Subinterfaces:
PrismContainerValue<C>
,PrismContainerValueDelegator<C>
,PrismObjectValue<O>
- All Known Implementing Classes:
LazyPrismContainerValue
,PrismContainerValueImpl
,PrismObjectValueImpl
,ShadowAssociationValue
public interface Walkable
Allow to walk conditionally through an object hierarchy
-
Method Summary
-
Method Details
-
walk
void walk(BiPredicate<? super ItemPath, Boolean> descendPredicate, Predicate<? super ItemPath> consumePredicate, Consumer<? super Item<?, throws SchemaException?>> itemConsumer) Walk through hierarchy of containing items based on provided conditions. Caller can provide two types of conditions. One (consumePredicate
) is used to decide if currently iterated item should be consumed (by provideditemConsumer
). Second (descendPredicate
) tells, if walk should descend into currently iterated item. Descending condition is a BiPredicate in order to allow caller decide not just based on item path, but also based on the fact if the item was also consumed (depending on implementation, the results ofconsumePredicate
could be directly passed to the descending condition).- Parameters:
descendPredicate
- theBiPredicate
which tells whether to descend into current item. Boolean parameter tells whether the item was also consumed or not.consumePredicate
- thePredicate
which tells whether to consume current item.itemConsumer
- the consumer to consume item with if it passes theconsumePredicate
test.- Throws:
SchemaException
- when something wrong happen during the walk.
-