it.auties.whatsapp.api.AsyncVerificationCodeSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of whatsappweb4j Show documentation
Show all versions of whatsappweb4j Show documentation
Standalone fully-featured Whatsapp Web API for Java and Kotlin
package it.auties.whatsapp.api;
import lombok.NonNull;
import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;
/**
* An interface to represent a supplier that returns a code wrapped in a CompletableFuture
*/
public interface AsyncVerificationCodeSupplier extends Supplier> {
/**
* Creates an asynchronous supplier from a syncronous one
*
* @param supplier a non-null supplier
* @return a non-null async supplier
*/
static AsyncVerificationCodeSupplier of(@NonNull Supplier supplier){
return () -> CompletableFuture.completedFuture(supplier.get());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy