You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Niall Pemberton <ni...@gmail.com> on 2007/04/15 17:51:43 UTC

[lang] StringUtils startsWith / endsWith methods

I posted a patch for StringUtils to add a number of new methods to the
following Jira ticket:

http://issues.apache.org/jira/browse/LANG-326

Any objections to me committing this?

Niall

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[collections] or [beanutils] BeanComparatorChain

Posted by Michael Heuer <he...@acm.org>.
Hello,

Might there be interest in a BeanComparatorChain, that is a Comparator
implementation that maintains an o.a.c.collections.c.ComparatorChain of
o.a.c.beanutils.BeanComparators?

class BeanComparatorChain<T> implements Comparator<T>
 BeanComparatorChain();
 BeanComparatorChain(String[]);
 BeanComparatorChain(List<String>);
 int compare(T, T);
 List<String> getProperties();
 void addProperty(String);
 void removeProperty(String);
 void moveToFront(String);
 void moveToBack(String);
 void moveForward(String);
 void moveBack(String);
 void swap(String, String);
 boolean isAscending(String);
 boolean isDescending(String);
 void setAscending(String);
 void setDescending(String);
 void toggle(String);

where the Strings are beanutils property expressions.

I am asking before submitting to JIRA, since I may need to re-license it
to do so.

Thanks,

   michael


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [lang] StringUtils startsWith / endsWith methods

Posted by Niall Pemberton <ni...@gmail.com>.
I guess I'll hold off on commiting this for the time being - Stephen
C. asked (on Jira ticket LANG-316) whether we should have a
CaseInsenstiveStringUtils - and Stephen K's is also a good point
(Collators were news to me).

Niall

On 4/17/07, Stephen Kestle <st...@orionhealth.com> wrote:
> Yeah - ascii still does scale in some cases.  However, I imagine
> String.equalsIgnoreCase() is an exercise in legacy code conversion as
> well as speed.  By all means, add ignoreCase for the shops that don't
> need/know better, but just make sure that Collator/Comparator use is an
> option, and is encouraged in the javadoc.  I'm not sure how to raise a
> ticket for this, as it probably spans quite a few classes...
>
> Henri Yandell wrote:
> > Stephen Kestle had this view of case insensitivity:
> >
> > http://issues.apache.org/jira/browse/LANG-316
> >
> > Given that I've a strong interest in multiple locales etc, I
> > definitely see Stephen's point, but your example shows a good reason
> > why the low ASCII chars do scale - domain names (at least until it all
> > gets complicated at some unknown point in the future).
> >
> > Make them @since 3.0 (given that's what it is in JIRA). We can change
> > that later if need be.
> >
> > Hen
> >
> > On 4/15/07, Niall Pemberton <ni...@gmail.com> wrote:
> >> I posted a patch for StringUtils to add a number of new methods to the
> >> following Jira ticket:
> >>
> >> http://issues.apache.org/jira/browse/LANG-326
> >>
> >> Any objections to me committing this?
> >>
> >> Niall
> >>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [lang] StringUtils startsWith / endsWith methods

Posted by Stephen Kestle <st...@orionhealth.com>.
Yeah - ascii still does scale in some cases.  However, I imagine 
String.equalsIgnoreCase() is an exercise in legacy code conversion as 
well as speed.  By all means, add ignoreCase for the shops that don't 
need/know better, but just make sure that Collator/Comparator use is an 
option, and is encouraged in the javadoc.  I'm not sure how to raise a 
ticket for this, as it probably spans quite a few classes...

Henri Yandell wrote:
> Stephen Kestle had this view of case insensitivity:
>
> http://issues.apache.org/jira/browse/LANG-316
>
> Given that I've a strong interest in multiple locales etc, I
> definitely see Stephen's point, but your example shows a good reason
> why the low ASCII chars do scale - domain names (at least until it all
> gets complicated at some unknown point in the future).
>
> Make them @since 3.0 (given that's what it is in JIRA). We can change
> that later if need be.
>
> Hen
>
> On 4/15/07, Niall Pemberton <ni...@gmail.com> wrote:
>> I posted a patch for StringUtils to add a number of new methods to the
>> following Jira ticket:
>>
>> http://issues.apache.org/jira/browse/LANG-326
>>
>> Any objections to me committing this?
>>
>> Niall
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [lang] StringUtils startsWith / endsWith methods

Posted by Henri Yandell <fl...@gmail.com>.
Stephen Kestle had this view of case insensitivity:

http://issues.apache.org/jira/browse/LANG-316

Given that I've a strong interest in multiple locales etc, I
definitely see Stephen's point, but your example shows a good reason
why the low ASCII chars do scale - domain names (at least until it all
gets complicated at some unknown point in the future).

Make them @since 3.0 (given that's what it is in JIRA). We can change
that later if need be.

Hen

On 4/15/07, Niall Pemberton <ni...@gmail.com> wrote:
> I posted a patch for StringUtils to add a number of new methods to the
> following Jira ticket:
>
> http://issues.apache.org/jira/browse/LANG-326
>
> Any objections to me committing this?
>
> Niall
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org