On 11 July 2011 19:21, Viktor Hedefalk <hedef...@gmail.com> wrote:
> I guess that the method that could be possible to use in ThreeTen
> would be this one?
>    public DateTimeParseContext parse(CharSequence text, ParsePosition
> position) {

If you need the ParsePosition, then that is the one.

> This line hurts
>
>  // parse a String as its a better API for parser writers
>  String str = text.toString();
>
> since it will be the entire input I'm parsing but I guess it probably
> works in practice in my case, I'll have to try it out and get back.

Thats the current choice I'm making, CharSequence outside, String inside.

> Just of curiosity, what is it in String that makes it easier for parser 
> writers?

Its just a bigger API, with startsWith, contains, indexOf,
regionMatches ... I tried to convert it to CharSeq internally, but it
seemed like more hassle than it was worth. If you can convince me its
really a major hassle or performance issue, then I might accept a pull
request, but I'd prefer not to if possible.

Stephen

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to