Package tripleplay.ui.util
Class ElementOp<T extends Element<?>>
java.lang.Object
tripleplay.ui.util.ElementOp<T>
- Type Parameters:
T
- the leaf type of Element.
Defines a method that applies an operation to an element.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Applies an arbitrary operation to the given element.final void
applyToEach
(Iterable<? extends T> elems) Iterates the given elements and applies this operation to each.setEnabled
(boolean enabled) Returns an element operation that enables or disables its elements.
-
Constructor Details
-
ElementOp
public ElementOp()
-
-
Method Details
-
setEnabled
Returns an element operation that enables or disables its elements. Usage:Hierarchy.of(elem).apply(ElementOp.setEnabled(false));
-
apply
Applies an arbitrary operation to the given element. -
applyToEach
Iterates the given elements and applies this operation to each.
-