[stringtemplate-interest] ST4: varargs version of add ?
Collin Fagan
collin.fagan at gmail.com
Tue Feb 1 18:54:02 PST 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110201/62917fe0/attachment.html
More information about the stringtemplate-interest
mailing list