You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2012/10/09 21:33:53 UTC

[v2] Filterable is an odd class name

Hi All:

I see:

/**
 * Enhances a Class by allowing it to contain Filters.
 */
public class Filterable implements Filtering {

Which looks really weird to my eye, especially when I read:

public abstract class AbstractAppender extends Filterable implements
Appender, Lifecycle {

A type that is -able, is usually an interface, not a class, for example:
Comparable, Iterable, Serializable. (Yes, the obvious exception is
Throwable, pun intended).

My malaise is compounded by the name of the interface "Filtering" which is
described as "Enhances a Class by allowing it to contain Filters.". A -ing
class name is just

I propose to rename:

- Filtering (the interface) to:
     Filterable or
     FilterCollection

- Filterable (the class) to:
     FilterObject or
     FilterContainer or
     FilterHolder or
     FilterWrapper

such that, for example FilterObject implements Filterable

Thoughts?

Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [v2] Filterable is an odd class name

Posted by Gary Gregory <ga...@gmail.com>.
Ok. I'll play with that later.

Gary

On Nov 2, 2012, at 22:51, Ralph Goers <ra...@dslextreme.com> wrote:

Yeah, OK.

Filterable is probably a better name for the interface.  I'd be more
inclined to rename the class to AbstractFilterable than any of the choices
you listed.

Ralph


On Nov 2, 2012, at 6:39 PM, Gary Gregory wrote:

Ralph or anyone?

Gary

On Tue, Oct 9, 2012 at 3:33 PM, Gary Gregory <ga...@gmail.com> wrote:

> Hi All:
>
> I see:
>
> /**
>  * Enhances a Class by allowing it to contain Filters.
>  */
> public class Filterable implements Filtering {
>
> Which looks really weird to my eye, especially when I read:
>
> public abstract class AbstractAppender extends Filterable implements
> Appender, Lifecycle {
>
> A type that is -able, is usually an interface, not a class, for example:
> Comparable, Iterable, Serializable. (Yes, the obvious exception is
> Throwable, pun intended).
>
> My malaise is compounded by the name of the interface "Filtering" which is
> described as "Enhances a Class by allowing it to contain Filters.". A
> -ing class name is just
>
> I propose to rename:
>
> - Filtering (the interface) to:
>      Filterable or
>      FilterCollection
>
> - Filterable (the class) to:
>      FilterObject or
>      FilterContainer or
>      FilterHolder or
>      FilterWrapper
>
> such that, for example FilterObject implements Filterable
>
> Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977/>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977/>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [v2] Filterable is an odd class name

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Nov 2, 2012 at 10:50 PM, Ralph Goers <ra...@dslextreme.com>wrote:

> Yeah, OK.
>
> Filterable is probably a better name for the interface.  I'd be more
> inclined to rename the class to AbstractFilterable than any of the choices
> you listed.
>

Done.

Gary

>
> Ralph
>
>
> On Nov 2, 2012, at 6:39 PM, Gary Gregory wrote:
>
> Ralph or anyone?
>
> Gary
>
> On Tue, Oct 9, 2012 at 3:33 PM, Gary Gregory <ga...@gmail.com>wrote:
>
>> Hi All:
>>
>> I see:
>>
>> /**
>>  * Enhances a Class by allowing it to contain Filters.
>>  */
>> public class Filterable implements Filtering {
>>
>> Which looks really weird to my eye, especially when I read:
>>
>> public abstract class AbstractAppender extends Filterable implements
>> Appender, Lifecycle {
>>
>> A type that is -able, is usually an interface, not a class, for example:
>> Comparable, Iterable, Serializable. (Yes, the obvious exception is
>> Throwable, pun intended).
>>
>> My malaise is compounded by the name of the interface "Filtering" which
>> is described as "Enhances a Class by allowing it to contain Filters.". A
>> -ing class name is just
>>
>> I propose to rename:
>>
>> - Filtering (the interface) to:
>>      Filterable or
>>      FilterCollection
>>
>> - Filterable (the class) to:
>>      FilterObject or
>>      FilterContainer or
>>      FilterHolder or
>>      FilterWrapper
>>
>> such that, for example FilterObject implements Filterable
>>
>> Thoughts?
>>
>> Gary
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> JUnit in Action, 2nd Ed: <http://goog_1249600977/>http://bit.ly/ECvg0
>> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977/>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [v2] Filterable is an odd class name

Posted by Ralph Goers <ra...@dslextreme.com>.
Yeah, OK.  

Filterable is probably a better name for the interface.  I'd be more inclined to rename the class to AbstractFilterable than any of the choices you listed.

Ralph


On Nov 2, 2012, at 6:39 PM, Gary Gregory wrote:

> Ralph or anyone?
> 
> Gary
> 
> On Tue, Oct 9, 2012 at 3:33 PM, Gary Gregory <ga...@gmail.com> wrote:
> Hi All:
> 
> I see:
> 
> /**
>  * Enhances a Class by allowing it to contain Filters.
>  */
> public class Filterable implements Filtering {
> 
> Which looks really weird to my eye, especially when I read:
> 
> public abstract class AbstractAppender extends Filterable implements Appender, Lifecycle {
> 
> A type that is -able, is usually an interface, not a class, for example: Comparable, Iterable, Serializable. (Yes, the obvious exception is Throwable, pun intended).
> 
> My malaise is compounded by the name of the interface "Filtering" which is described as "Enhances a Class by allowing it to contain Filters.". A -ing class name is just 
> 
> I propose to rename:
> 
> - Filtering (the interface) to: 
>      Filterable or 
>      FilterCollection 
> 
> - Filterable (the class) to: 
>      FilterObject or
>      FilterContainer or 
>      FilterHolder or 
>      FilterWrapper 
> 
> such that, for example FilterObject implements Filterable 
> 
> Thoughts?
> 
> Gary
> 
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory


Re: [v2] Filterable is an odd class name

Posted by Gary Gregory <ga...@gmail.com>.
Ralph or anyone?

Gary

On Tue, Oct 9, 2012 at 3:33 PM, Gary Gregory <ga...@gmail.com> wrote:

> Hi All:
>
> I see:
>
> /**
>  * Enhances a Class by allowing it to contain Filters.
>  */
> public class Filterable implements Filtering {
>
> Which looks really weird to my eye, especially when I read:
>
> public abstract class AbstractAppender extends Filterable implements
> Appender, Lifecycle {
>
> A type that is -able, is usually an interface, not a class, for example:
> Comparable, Iterable, Serializable. (Yes, the obvious exception is
> Throwable, pun intended).
>
> My malaise is compounded by the name of the interface "Filtering" which is
> described as "Enhances a Class by allowing it to contain Filters.". A
> -ing class name is just
>
> I propose to rename:
>
> - Filtering (the interface) to:
>      Filterable or
>      FilterCollection
>
> - Filterable (the class) to:
>      FilterObject or
>      FilterContainer or
>      FilterHolder or
>      FilterWrapper
>
> such that, for example FilterObject implements Filterable
>
> Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory