Class Selectable

    • Constructor Detail

      • Selectable

        public Selectable()
    • Method Detail

      • select

        public final void select​(ObjectPredicate predicate,
                                 ObjectOperation operation)
        Apply the predicate to this object. If the predicate returns true, pass this object to the operation, otherwise invoke the selectMembers(ObjectPredicate, ObjectOperation) method to locate sub-elements that might trigger the predicate.
        Parameters:
        predicate - component used to select (sub-)objects
        operation - component performing some operation on the selected (sub-)objects
      • selectMembers

        public void selectMembers​(ObjectPredicate predicate,
                                  ObjectOperation operation)
        Invoke select(ObjectPredicate, ObjectOperation) on any member objects this object wants to expose through the selection mechanism. Overriding this method is optional, and which objects to expose is determined by the application logic of the object itself.
        Parameters:
        predicate - component used to select (sub-)objects
        operation - component performing some operation on the selected (sub-)objects