/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * license agreements; and to You under the Apache License, version 2.0:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * This file is part of the Apache Pekko project, which was derived from Akka.
 */

/*
 * Copyright (C) 2015-2022 Lightbend Inc. <https://www.lightbend.com>
 */

package org.apache.pekko.japi.function

import scala.annotation.nowarn

[3..22#/**
 * A Function interface. Used to create 1-arg first-class-functions is Java.
 * `Serializable` is needed to be able to grab line number for Java 8 lambdas.
 */
@nowarn("msg=@SerialVersionUID has no effect")
@SerialVersionUID(##1L)
@FunctionalInterface
trait Function1[[#-T1#], +R] extends java.io.Serializable {
  @throws(classOf[Exception])
  def apply([#arg1: T1#]): R
}#

]

[2..#/**
 * A Consumer interface. Used to create 1-arg consumers in Java.
 * A Procedure is like a Function, but it doesn't produce a return value.
 * `Serializable` is needed to be able to grab line number for Java 8 lambdas.
 */
@nowarn("msg=@SerialVersionUID has no effect")
@SerialVersionUID(##1L)
@FunctionalInterface
trait Procedure1[[#-T1#]] extends java.io.Serializable {
  @throws(classOf[Exception])
  def apply([#arg1: T1#]): Unit
}#

]
