[stringtemplate-interest] ST4: varargs version of add ?
Udo Borkowski
ub at abego-software.de
Wed Feb 2 02:26:34 PST 2011
I like the idea.
Udo
On 02.02.2011, at 03:54, Collin Fagan wrote:
> Hi,
>
> I find I would like to pass multiple items to add. Would it be possible to get a varargs version of add?
>
> Maybe something like this?
>
> public synchronized void add(String name, Object value, Object ... moreValues) {
> List<Object> allObjects = new ArrayList<Object>();
> allObjects.add(value);
> Collections.addAll(allObjects, moreValues);
> add(name, allObjects);
> }
>
> Of course this isn't the most efficient implementation one could write but we could deal with that if anyone liked the idea of a varargs add.
>
> Collin
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110202/68c5b7ea/attachment.html
More information about the stringtemplate-interest
mailing list