HBASE-3770 Make FilterList accept var arg Filters in its constructor as a convenience

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1091641 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-04-13 04:23:45 +00:00
parent 1365d64606
commit 08cb49b04d
2 changed files with 23 additions and 0 deletions

View File

@ -149,6 +149,8 @@ Release 0.91.0 - Unreleased
HBASE-3729 Get cells via shell with a time range predicate
(Ted Yu via Stack)
HBASE-3764 Book.xml - adding 2 FAQs (SQL and arch question)
HBASE-3770 Make FilterList accept var arg Filters in its constructor
as a convenience (Erik Onnen via Stack)
TASKS
HBASE-3559 Move report of split to master OFF the heartbeat channel

View File

@ -29,6 +29,7 @@ import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@ -71,6 +72,15 @@ public class FilterList implements Filter {
this.filters = rowFilters;
}
/**
* Constructor that takes a var arg number of {@link Filter}s. The fefault operator
* MUST_PASS_ALL is assumed.
* @param rowFilters
*/
public FilterList(final Filter... rowFilters) {
this.filters = Arrays.asList(rowFilters);
}
/**
* Constructor that takes an operator.
*
@ -91,6 +101,17 @@ public class FilterList implements Filter {
this.operator = operator;
}
/**
* Constructor that takes a var arg number of {@link Filter}s and an operator.
*
* @param operator Operator to process filter set with.
* @param rowFilters Filters to use
*/
public FilterList(final Operator operator, final Filter... rowFilters) {
this.filters = Arrays.asList(rowFilters);
this.operator = operator;
}
/**
* Get the operator.
*