All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jpower.core.Task Maven / Gradle / Ivy

There is a newer version: 0.0.5
Show newest version
package jpower.core;

import jpower.core.internal.CancelStateTracker;

public interface Task extends Runnable
{

    public default void run()
    {
        execute();
    }

    public void execute();
    
    public default boolean isCancelled()
    {
        return CancelStateTracker.isCancelled(this);
    }

    public default void cancel()
    {
        CancelStateTracker.setCancelled(this, true);
    }

    public default void activate()
    {
        CancelStateTracker.setCancelled(this, false);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy