jaskell.parsec.common.Atom Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaskell-java8 Show documentation
Show all versions of jaskell-java8 Show documentation
This is a utils library for java 8 project.
It include parsec combinators and sql generators library.
package jaskell.parsec.common;
import java.util.Set;
import java.util.function.Predicate;
/**
* Created by march on 16/9/12.
* static util class for atom parsers.
*/
public class Atom {
public static One one() {
return new One<>();
}
public static Eof eof() {
return new Eof<>();
}
public static Return pack(T value) {
return new Return<>(value);
}
public static Fail
fail(String message, Object...objects) {
return new Fail<>(message, objects);
}
public static Eq eq(E item) {
return new Eq<>(item);
}
public static Ne ne(E item) {
return new Ne<>(item);
}
public static OneOf oneOf(Set data) {
return new OneOf<>(data);
}
public static NoneOf noneOf(Set data) {
return new NoneOf<>(data);
}
public static Is is(Predicate predicate) {
return new Is<>(predicate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy