Hi Phil, Phil Steitz wrote on Monday, February 20, 2006 6:28 AM:
> Jörg Schaible wrote: >> Jörg Schaible wrote on Monday, February 06, 2006 9:07 PM: >> [snip] >>> Looks fine. I've added the missing minLength/maxLength >>> implementations and made it serializable. I would add a >>> ConstantIdentifierGenerator. >>> >> >> What about adding adding a method to > StringIdentifierGenerator to deal with StringBuffers? >> >> StringBuffer nextIdentifier(StringBuffer buffer); >> >> The implementation should append the next identifier to the > buffer and return it. This would make the concatenation more > efficient and may be also useful for other use cases where > the returned id is added to a String. >> > Finally getting back into this. Sorry for the latency. :) Had some other tasks, too. I basically stopped since the next thing is working either on the composite thingy or the UUID classes. > I like the idea > above from the standpoint of efficiency, but it looks a > little odd as an > API. Could be nothing wrong with it, just looks odd at first > blush to me. jMock uses such an API for its Constraint.describeTo. Therefore I am used to it. Since it does make sense for StringIdentifierGenerators only and the implementation are/should be performance optimized, it is worth it IMHO. > Might be better to change the name to > appendNextIdentifier, so the > append semantics are clear. Well, you don't have to append, an impl might even return another StringBuffer (although append *is* the most natural case). > I will add ConstantIdentifierGenerator in any case. OK. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]