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

    Modifier and Type
    Method
    Description
    void
    walk(BiPredicate<? super ItemPath,Boolean> descendPredicate, Predicate<? super ItemPath> consumePredicate, Consumer<? super Item<?,?>> itemConsumer)
    Walk through hierarchy of containing items based on provided conditions.
  • Method Details

    • walk

      void walk(BiPredicate<? super ItemPath,Boolean> descendPredicate, Predicate<? super ItemPath> consumePredicate, Consumer<? super Item<?,?>> itemConsumer) throws SchemaException
      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 provided itemConsumer). 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 of consumePredicate could be directly passed to the descending condition).
      Parameters:
      descendPredicate - the BiPredicate which tells whether to descend into current item. Boolean parameter tells whether the item was also consumed or not.
      consumePredicate - the Predicate which tells whether to consume current item.
      itemConsumer - the consumer to consume item with if it passes the consumePredicate test.
      Throws:
      SchemaException - when something wrong happen during the walk.