saker.build Documentation TaskDoc JavaDoc Packages
public class FixedTaskDuplicationPredicate implements TaskDuplicationPredicate
This class is unreliable, don't use it.
TaskDuplicationPredicate implemetation that allows the associated task to be duplicated to a fixed number of executions.

An instance of this class is constructed by specifying the number of times the associated task can be duplicated. The shouldInvokeOnceMore() method will return true excatly the specified number amount of times.

Constructors
public
Creates a new instance with the specified number of duplication.
Methods
public boolean
Checks if the associated task should be invoked once more.
Creates a new instance with the specified number of duplication.
countThe duplication number.
IllegalArgumentExceptionIf the argument is negative or zero.
public boolean shouldInvokeOnceMore() throws RuntimeException
Overridden from: TaskDuplicationPredicate
Checks if the associated task should be invoked once more.

This method should check if there is anything left to be done for duplicated tasks. If so, return true in which case a new instance of the task will be started and executed.

If this method returns false, it should return false for any further calls to it.

true if the associated task should be invoked once more.
RuntimeExceptionIf the predicate fails to determine its result. Implementations should not directly throw this exception, but return false instead. The handling of the exception is implementation dependent to the build system, but usually will be treated as if the associated task threw an exception.