You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Stack <st...@duboce.net> on 2010/08/11 06:44:40 UTC

Why does FilterList inherit from Filter and not from FilterBase? Any particular reason?

See subject.

If not, ok if we fix this?

Thanks,
St.Ack

Re: Why does FilterList inherit from Filter and not from FilterBase? Any particular reason?

Posted by Stack <st...@duboce.net>.
On Tue, Aug 10, 2010 at 10:49 PM, Ryan Rawson <ry...@gmail.com> wrote:
> Filter is a large interface requiring something like 6-7 methods to be
> defined.  Furthermore, nearly all of those methods have a reasonable
> default for a 'null filter' that would filter nothing.  That is what
> FilterBase does.
>
> FilterList overrides every single interface method, thus it doesn't
> need FilterBase. One could make it derive from FilterBase, but that
> relationship would neither communicate any design statements (eg: a
> FilterList ISA FilterBase is not relevant), nor would it provide
> useful base implementation.
>
> If you think it's more important to be consistent, it wouldn't hurt to
> inherit from FilterBase.
>

Consistency is usually good but seems like inserting FilterBase would
make no sense.  Thanks for the explaination.
St.Ack

Re: Why does FilterList inherit from Filter and not from FilterBase? Any particular reason?

Posted by Ryan Rawson <ry...@gmail.com>.
Filter is a large interface requiring something like 6-7 methods to be
defined.  Furthermore, nearly all of those methods have a reasonable
default for a 'null filter' that would filter nothing.  That is what
FilterBase does.

FilterList overrides every single interface method, thus it doesn't
need FilterBase. One could make it derive from FilterBase, but that
relationship would neither communicate any design statements (eg: a
FilterList ISA FilterBase is not relevant), nor would it provide
useful base implementation.

If you think it's more important to be consistent, it wouldn't hurt to
inherit from FilterBase.

-ryan

On Tue, Aug 10, 2010 at 9:44 PM, Stack <st...@duboce.net> wrote:
> See subject.
>
> If not, ok if we fix this?
>
> Thanks,
> St.Ack
>