Okay, yea, I see what you're saying. You mean hold an Object reference and check for instanceof an array, like you're doing now with IValidator and the list? You mind if I take a shot at that?
On 8/11/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > Why not just start with 1, not like you are losing anything. I like to > create compound validators so most of my components just use a single > validator. Don't know how common a practice that is, but I will definetely > be outside that 99% :) > > -Igor > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf > > Of Phil Kulak > > Sent: Thursday, August 11, 2005 10:13 PM > > To: [email protected] > > Subject: Re: [Wicket-develop] FormComponent.ValidatorList, why? > > > > Yea, that's what I was saying about making our own > > implementation of ArrayList. Arrays are more efficient, > > memory wise, then creating objects. I think. > > > > I would say, start it off at length == 2 (since I'd say 99% > > of the time it's one or two), then bump it up (with array > > copying) by one each time instead of doubling it each time > > like ArrayList does. > > > > On 8/11/05, Jonathan Locke <[EMAIL PROTECTED]> wrote: > > > > > > the one thing i can think of that would actually be more efficient > > > that what we've got now is to do a union using Object between > > > IValidator and IValidator[] and manage the array by hand. > > that would > > > actually get rid of all node objects in cases where we have > > more than > > > 2. also, the array object should be smaller, when trimmed to size > > > than the current node object. > > > > > > Jonathan Locke wrote: > > > > > > > > > > > ooh. actually this is incorrect too. > > > > > > > > for 1, it's the object directly > > > > for 2, there is only ONE node (because of left/right > > pointers!) for > > > > N, there are N - 1 node objects > > > > > > > > and the cases of 1 or 2 validators is really the majority. > > > > > > > > Phil Kulak wrote: > > > > > > > >> Well, right now you're doing exactly what LinkedList > > does. You're > > > >> wrapping every object in a node and including two object > > references. > > > >> Where's the space savings? You could get rid of half the > > objects by > > > >> using an array and essentially reimplementing ArrayList. The > > > >> downside here is that if I add a string validator to a > > > >> RequiredTextField, I have no gaurantees that the value I > > get will be non-null. > > > >> > > > >> I do like what you did with the booleans though. That's tight. :) > > > >> > > > >> > > > >> ------------------------------------------------------- > > > >> SF.Net email is Sponsored by the Better Software > > Conference & EXPO > > > >> September 19-22, 2005 * San Francisco, CA * Development > > Lifecycle > > > >> Practices Agile & Plan-Driven Development * Managing Projects & > > > >> Teams * Testing & QA Security * Process Improvement & > > Measurement * > > > >> http://www.sqe.com/bsce5sf > > > >> _______________________________________________ > > > >> Wicket-develop mailing list > > > >> [email protected] > > > >> https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > >> > > > >> > > > >> > > > > > > > > > > > > ------------------------------------------------------- > > > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > > > Practices > > > > Agile & Plan-Driven Development * Managing Projects & > > Teams * Testing > > > > & QA > > > > Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > > > > _______________________________________________ > > > > Wicket-develop mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > > September 19-22, 2005 * San Francisco, CA * Development > > Lifecycle Practices > > > Agile & Plan-Driven Development * Managing Projects & Teams > > * Testing & QA > > > Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > > > _______________________________________________ > > > Wicket-develop mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development > > Lifecycle Practices > > Agile & Plan-Driven Development * Managing Projects & Teams * > > Testing & QA > > Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > > _______________________________________________ > > Wicket-develop mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Wicket-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-develop > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
