You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by John McNally <jm...@collab.net> on 2002/10/10 23:19:05 UTC

[collections][lang] deprecate StringStack

This class is badly named and I am not sure it belongs in collections. 
The original use of this class was to join sql fragments together to
form a where clause or a list of columns, etc.  So its class doc should
be something like:

This class provides a way to collect a list of unique strings and join
them with an optional separator.

This behavour is almost similar to StringUtils.join method though that
does not handle the unique requirement.  Maybe a suitable replacement
could be added to lang.StringUtils?

StringStack's original source was torque and we will adjust to the
removal of the class.  It really should be deprecated, I'm not sure I
see the value in trying to create a Stack or List implementation out of
the current class.

john mcnally




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [collections][lang] deprecate StringStack

Posted by Stephen Colebourne <sc...@btopenworld.com>.
StringStack is now deprecated as you propose.

Stephen

----- Original Message -----
From: "John McNally" <jm...@collab.net>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Thursday, October 10, 2002 10:19 PM
Subject: [collections][lang] deprecate StringStack


> This class is badly named and I am not sure it belongs in collections.
> The original use of this class was to join sql fragments together to
> form a where clause or a list of columns, etc.  So its class doc should
> be something like:
>
> This class provides a way to collect a list of unique strings and join
> them with an optional separator.
>
> This behavour is almost similar to StringUtils.join method though that
> does not handle the unique requirement.  Maybe a suitable replacement
> could be added to lang.StringUtils?
>
> StringStack's original source was torque and we will adjust to the
> removal of the class.  It really should be deprecated, I'm not sure I
> see the value in trying to create a Stack or List implementation out of
> the current class.
>
> john mcnally
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [collections][lang] deprecate StringStack

Posted by Henri Yandell <ba...@generationjava.com>.

On 10 Oct 2002, John McNally wrote:

> This class is badly named and I am not sure it belongs in collections.
> The original use of this class was to join sql fragments together to
> form a where clause or a list of columns, etc.  So its class doc should
> be something like:
>
> This behavour is almost similar to StringUtils.join method though that
> does not handle the unique requirement.  Maybe a suitable replacement
> could be added to lang.StringUtils?

Well.... It can be done. Touch more work as usual :)

HashSet the strings. Then pass an Iterator to StringUtils.join?

Just a thought.

> StringStack's original source was torque and we will adjust to the
> removal of the class.  It really should be deprecated, I'm not sure I
> see the value in trying to create a Stack or List implementation out of
> the current class.

+1

Let me know what would be good for you in StringUtils.

Hen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>