> I'd like to remove all elements in my vector from, say, index i to the end.
> Is there a good way of doing this? I have a kludge which may or may not do
[quoted text clipped - 4 lines]
>
> }

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
On Wed, 29 Mar 2006 15:43:08 +0100, Thomas Hawtin
<usenet@tackline.plus.com> wrote, quoted or indirectly quoted someone
who said :
>In general you can remove a range from a List with subList and then clear:
>
> myList.subList(from, to).clear();
clearing and removing are different operations. Is it possible to use
sublist to remove?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Thomas Hawtin - 29 Mar 2006 18:18 GMT
> On Wed, 29 Mar 2006 15:43:08 +0100, Thomas Hawtin
> <usenet@tackline.plus.com> wrote, quoted or indirectly quoted someone
[quoted text clipped - 4 lines]
> clearing and removing are different operations.
> sublist to remove?
clear removes all the elements from a collection. "Clear" does sound
like nulling out, but isn't.
> Is it possible to use
> sublist to remove?
"The returned list supports all of the optional list operations
supported by this list."
<http://download.java.net/jdk6/docs/api/java/util/List.html#subList(int,
int)>
(Which, coincidentally, also contains almost exactly the same example as
I wrote above.)
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/