// Path: src/main/java/org/blackdread/filtersortjooqapi/exception/FilteringApiException.java
// public class FilteringApiException extends BadUsageApiException {
// 
//     public FilteringApiException(final String message) {
//         super(message);
//     }
// }


import org.blackdread.filtersortjooqapi.exception.FilteringApiException;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.function.Function;
import java.util.function.Supplier;
package org.blackdread.filtersortjooqapi.filter.parser;




/**
 * Created by Yoann CAPLAIN on 2017/8/28.
 */
@FunctionalInterface
public interface FilterParser<R> {

    /**
     * @param value Value to be parsed
     * @return Value parsed and transform to generic value
     * @throws RuntimeException When parsing failed if implementation does not swallow exception
     */
    @NotNull
    R parse(final String value);

    /**
     * @param value  Value to be parsed
     * @param parser Custom parser function
     * @return Value parsed and transform to generic value
     * @throws FilteringApiException If an error occurred at parsing
     * @deprecated No sure it is useful, if need to define a new parser then better to create the class and etc
     */
// Path: src/main/java/org/blackdread/filtersortjooqapi/exception/FilteringApiException.java
// public class FilteringApiException extends BadUsageApiException {
// 
//     public FilteringApiException(final String message) {
//         super(message);
//     }
// }


// Path: src/main/java/org/blackdread/filtersortjooqapi/filter/parser/FilterParser.java
import org.blackdread.filtersortjooqapi.exception.FilteringApiException;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.function.Function;
import java.util.function.Supplier;

package org.blackdread.filtersortjooqapi.filter.parser;




/**
 * Created by Yoann CAPLAIN on 2017/8/28.
 */
@FunctionalInterface
public interface FilterParser<R> {

    /**
     * @param value Value to be parsed
     * @return Value parsed and transform to generic value
     * @throws RuntimeException When parsing failed if implementation does not swallow exception
     */
    @NotNull
    R parse(final String value);

    /**
     * @param value  Value to be parsed
     * @param parser Custom parser function
     * @return Value parsed and transform to generic value
     * @throws FilteringApiException If an error occurred at parsing
     * @deprecated No sure it is useful, if need to define a new parser then better to create the class and etc
     */
    default R parseWithApiException(final String value, final Function<String, R> parser) throws FilteringApiException {