public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments) {
    Preconditions.checkArgument(filterArguments.size() == 4 || filterArguments.size() == 6,
      "Expected 4 or 6 but got: %s", filterArguments.size());
    byte[] family = ParseFilter.removeQuotesFromByteArray(filterArguments.get(0));
    byte[] qualifier = ParseFilter.removeQuotesFromByteArray(filterArguments.get(1));
    CompareOperator op = ParseFilter.createCompareOperator(filterArguments.get(2));
    org.apache.hadoop.hbase.filter.ByteArrayComparable comparator =
      ParseFilter.createComparator(ParseFilter.removeQuotesFromByteArray(filterArguments.get(3)));

    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");
      }
    }

    SingleColumnValueFilter filter = new SingleColumnValueFilter(family, qualifier, op, comparator);

    if (filterArguments.size() == 6) {
      boolean filterIfMissing = ParseFilter.convertByteArrayToBoolean(filterArguments.get(4));
      boolean latestVersionOnly = ParseFilter.convertByteArrayToBoolean(filterArguments.get(5));
      filter.setFilterIfMissing(filterIfMissing);
      filter.setLatestVersionOnly(latestVersionOnly);
    }
    return filter;
  }
Set whether only the latest version of the column value should be compared. If true, the row
will be returned if only the latest version of the column value matches. If false, the row will
be returned if any version of the column value matches. The default is true.
@param latestVersionOnly flag
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SingleColumnValueFilter.java