// Path: rsql-api-parent/rsql-api-core/src/main/java/com/github/vineey/rql/core/util/StringUtils.java
// public class StringUtils {
//     public static boolean isEmpty(String time) {
//       return time == null || time.isEmpty();
//     }
// 
//     public static boolean isNotEmpty(String time) {
//         return !isEmpty(time);
//     }
// }


import com.github.vineey.rql.core.util.StringUtils;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import cz.jirutka.rsql.parser.ast.ComparisonOperator;
import cz.jirutka.rsql.parser.ast.RSQLOperators;
    public static String build(String selector, ComparisonOperator op, String... args) {
        validateArgument(args);
        if (singleArgOps.contains(op)) {
            return selector + op.getSymbol() + args[0];
        } else {
            return selector + op.getSymbol() + buildArguments(args);
        }
    }

    public static String[] buildAllSymbols(String selector, ComparisonOperator op, String... args) {
        validateArgument(args);
        String[] rqlFilters = new String[op.getSymbols().length];

        int index = 0;
        for (String symbol : op.getSymbols()) {
            if (singleArgOps.contains(op)) {
                rqlFilters[index] = selector + symbol + args[0];
            } else {
                rqlFilters[index] = selector + symbol + buildArguments(args);
            }
            index++;
        }

        return rqlFilters;
    }

    private static void validateArgument(String[] args) {
        Preconditions.checkNotNull(args);
        Preconditions.checkArgument(args.length > 0);
        for (String arg : args) {
// Path: rsql-api-parent/rsql-api-core/src/main/java/com/github/vineey/rql/core/util/StringUtils.java
// public class StringUtils {
//     public static boolean isEmpty(String time) {
//       return time == null || time.isEmpty();
//     }
// 
//     public static boolean isNotEmpty(String time) {
//         return !isEmpty(time);
//     }
// }


// Path: rsql-querydsl-parent/rsql-querydsl-filter/src/main/java/com/github/vineey/rql/querydsl/filter/util/RSQLUtil.java
import com.github.vineey.rql.core.util.StringUtils;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import cz.jirutka.rsql.parser.ast.ComparisonOperator;
import cz.jirutka.rsql.parser.ast.RSQLOperators;

    public static String build(String selector, ComparisonOperator op, String... args) {
        validateArgument(args);
        if (singleArgOps.contains(op)) {
            return selector + op.getSymbol() + args[0];
        } else {
            return selector + op.getSymbol() + buildArguments(args);
        }
    }

    public static String[] buildAllSymbols(String selector, ComparisonOperator op, String... args) {
        validateArgument(args);
        String[] rqlFilters = new String[op.getSymbols().length];

        int index = 0;
        for (String symbol : op.getSymbols()) {
            if (singleArgOps.contains(op)) {
                rqlFilters[index] = selector + symbol + args[0];
            } else {
                rqlFilters[index] = selector + symbol + buildArguments(args);
            }
            index++;
        }

        return rqlFilters;
    }

    private static void validateArgument(String[] args) {
        Preconditions.checkNotNull(args);
        Preconditions.checkArgument(args.length > 0);
        for (String arg : args) {
            Preconditions.checkArgument(StringUtils.isNotEmpty(arg), "Argument should not be empty!");