public static ArrayList<Object> extractArguments(ArrayList<byte[]> filterArguments) {
    Preconditions.checkArgument(filterArguments.size() == 2, "Expected 2 but got: %s",
      filterArguments.size());
    CompareOperator op = ParseFilter.createCompareOperator(filterArguments.get(0));
    ByteArrayComparable comparator =
      ParseFilter.createComparator(ParseFilter.removeQuotesFromByteArray(filterArguments.get(1)));

    if (comparator instanceof RegexStringComparator || comparator instanceof SubstringComparator) {
      if (op != CompareOperator.EQUAL && op != CompareOperator.NOT_EQUAL) {
        throw new IllegalArgumentException("A regexstring comparator and substring comparator"
          + " can only be used with EQUAL and NOT_EQUAL");
      }
    }
    ArrayList<Object> arguments = new ArrayList<>(2);
    arguments.add(op);
    arguments.add(comparator);
    return arguments;
  }
Returns an array of heterogeneous objects
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/CompareFilter.java