io.github.laskowski.shell.output.messages.MessageAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shell-commander Show documentation
Show all versions of shell-commander Show documentation
Library to launch .bat and .sh scripts of your choice with different configurations. Allows you to read tasks and services output from terminal
package io.github.laskowski.shell.output.messages;
import io.github.laskowski.shell.output.service.ServiceReadyPredicate;
import java.util.function.Predicate;
public abstract class MessageAction implements ServiceReadyPredicate, ServiceErrorPredicate, MessageExclusionStrategy {
protected final String expected;
public MessageAction(String expected) {
this.expected = expected;
}
public abstract Predicate getPredicate();
@Override
public boolean test(String message) {
return getPredicate().test(message);
}
}