
io.github.vipcxj.jasync.spec.switchexpr.DefaultCase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jasync-spec Show documentation
Show all versions of jasync-spec Show documentation
JAsync implements Async-Await fashion for Java just like es and c#.
This library provide the spec of all public api.
package io.github.vipcxj.jasync.spec.switchexpr;
import io.github.vipcxj.jasync.spec.functional.VoidPromiseSupplier;
public class DefaultCase implements ICase {
private final VoidPromiseSupplier body;
public DefaultCase(VoidPromiseSupplier body) {
this.body = body;
}
@Override
public boolean is(C v, boolean findingDefault) {
return findingDefault;
}
@Override
public VoidPromiseSupplier getBody() {
return body;
}
public static DefaultCase of(VoidPromiseSupplier body) {
return new DefaultCase<>(body);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy