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

io.github.vipcxj.jasync.spec.BreakException Maven / Gradle / Ivy

Go to download

JAsync implements Async-Await fashion for Java just like es and c#. This library provide the spec of all public api.

There is a newer version: 1.0.17
Show newest version
package io.github.vipcxj.jasync.spec;

public class BreakException extends JAsyncException {

    private static final long serialVersionUID = -6532237818800947165L;
    private String label;

    public BreakException(String label) {
        super("", null, false, false);
        this.label = label;
    }

    public boolean matchLabel(String label) {
        return matchLabel(label, false);
    }

    public boolean matchLabel(String label, boolean block) {
        if (!block && this.label == null) {
            return true;
        } else if (block && this.label == null) {
            return false;
        } else {
            return this.label.equals(label);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy