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

org.lambda.actions.Action0 Maven / Gradle / Ivy

There is a newer version: 24.9.0
Show newest version
package org.lambda.actions;

import com.spun.util.ObjectUtils;

/**
  * Findable name for java.lang.Runnable
  **/
public interface Action0
{
  public static Action0 doNothing()
  {
    return () -> {
    };
  }
  public void call();
  public static Action0 runtime(Action0WithException exceptions)
  {
    return () -> {
      try
      {
        exceptions.call();
      }
      catch (Throwable t)
      {
        throw ObjectUtils.throwAsError(t);
      }
    };
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy