Re: Splitting Vector into smalller sub-Vectors
- From: Allan Bruce <notabruce@xxxxxxxxxxxxxxxxx>
- Date: Fri, 27 May 2005 13:07:59 +0100
Boudewijn Dijkstra wrote:
"Allan Bruce" <amb@xxxxxxx> schreef in bericht news:KJ6dne1FloMoCgjfRVnytg@xxxxxxxxxxxx
Is it possible to efficiently split a large Vector into smaller sub-Vectors without iterating through it and adding the Objects to the sub-Vectors? If not, is there a collection which allows this? I dont need random access, I am just adding blindly to a single collection, then want to split it up at the end.
java.util.List#subList(int,int)
I tried using ArrayList for this but I get a ClassCastException error at the following line:
lArray[j] = (ArrayList)lStates.subList(lStart, lEnd);
What can I do to avoid this? I read the docs but cant see anything that says what to do.
Thanks. Allan
.
- Follow-Ups:
- Re: Splitting Vector into smalller sub-Vectors
- From: Virgil Green
- Re: Splitting Vector into smalller sub-Vectors
- References:
- Splitting Vector into smalller sub-Vectors
- From: Allan Bruce
- Re: Splitting Vector into smalller sub-Vectors
- From: Boudewijn Dijkstra
- Splitting Vector into smalller sub-Vectors
- Prev by Date: jar problems
- Next by Date: Re: static or not?
- Previous by thread: Re: Splitting Vector into smalller sub-Vectors
- Next by thread: Re: Splitting Vector into smalller sub-Vectors
- Index(es):