Package com.diffplug.gradle
Class Lazyable<C>
- java.lang.Object
-
- com.diffplug.gradle.Lazyable<C>
-
public class Lazyable<C> extends Object
Represents a mutable element, probably a collection, which can be mutated directly, or lazily using theActionmechanism. If the actions are applied to the root mutable element, then it can be evaluated only once. Lazyable allows the actions to be evaluated many times, without modifying the underlying root.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLazyAction(Action<? super C> action)Adds an action which will act on a copy of the root collection.CgetResult()Returns the final result.CgetRoot()Returns the root object.static <T> Lazyable<ArrayList<T>>ofArrayList()Returns a Lazyable wrapper around an ArrayList.static <T> Lazyable<List<T>>ofList()Returns a Lazyable wrapper around a list.
-