atom feed17 messages in org.jdom.jdom-interestRE: [jdom-interest] Java 5 planning
FromSent OnAttachments
Jason HunterMar 4, 2008 1:39 pm 
Victor ToniMar 4, 2008 2:55 pm 
RolfMar 4, 2008 5:58 pm 
Mattias JiderhamnMar 4, 2008 11:38 pm 
Mattias JiderhamnMar 4, 2008 11:49 pm 
Michael KayMar 5, 2008 1:36 am 
Joe BowbeerMar 5, 2008 5:05 am 
Victor ToniMar 5, 2008 5:24 am 
Michael KayMar 5, 2008 7:15 am 
Mattias JiderhamnMar 6, 2008 12:04 am 
Jason HunterMar 8, 2008 12:43 am 
Michael KayMar 8, 2008 1:58 am 
Jason HunterMar 8, 2008 2:49 am 
Michael KayMar 8, 2008 9:49 am 
Timothy MarcMar 8, 2008 12:26 pm 
Mattias JiderhamnMar 12, 2008 2:03 am 
Tatu SalorantaMar 12, 2008 9:41 am 
Subject:RE: [jdom-interest] Java 5 planning
From:Michael Kay (mi@saxonica.com)
Date:Mar 5, 2008 7:15:34 am
List:org.jdom.jdom-interest

Actually every occurrence of String as a parameter could be changed to CharSequence allowing the user to pass String, StringBuffer, and StringBuilder or even CharBuffer.

The downside is that (a) you can't assume that the supplied value is immutable; if you need to retain it beyond the call you have to make a copy; (b) there can be a lot of "instance of" testing to see what kind of CharSequence you've been given, and (c) you can't compare different kinds of CharSequence for equality.

Saxon uses CharSequence very extensively despite these drawbacks, but it's not necessarily the right approach everywhere.