ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <>
Subject Re: [SUBMIT] Selector API Implementation
Date Mon, 14 Jan 2002 01:41:03 GMT
From: "Peter Donald" <>

> > Do we need an explicit method?  Can't the no-arg constructor be used
> > for such things?
> no because it has to be after the setOperation and setValue has been

Oh, ok.  I can add such a method, but must we do it at the
interface level?  I mean the isSelected method can still do something like

boolean isSelected(f) {
    if (!cached) {

This way, we could leave it to the Selector writer to decide
whether such a caching is to be done or not.  Why should it
be the interface's business to impose such a method be used?
I prefer to call the method as fillCache instead of initialize
because it conveys a different meaning to me/possibly to
others.  Any objections/better names?

> Thus you have removed all the expensive string operations from isSelected
> which is called for every file. And also check once for value being
> null

I have been creating a new instance of Selector for
every file, but I will change it that such that the same
Selector instance can be reused multiple times as
needed.  I didn't do it this way initially was because
I didn't want to create all the selector objects whether
they are used or not, but then, I can see it will be optimal
if I indeed did that.

> Pete


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message