Re: question
- From: Daniel Moyne <dmoyne@xxxxxxxxxx>
- Date: Thu, 27 Sep 2007 22:31:07 +0200
Lew wrote:
Daniel Moyne wrote:sorry but I need the ArrayList pointer to be known for some specific process
Now regarding you proposal which is neat though it does not allow for the
ArrayList [sic] to be used in another method of the class as actually
required in my work ; the example provided here was only meant to
understand the way the put action was working regarding the list value of
the map with different options ; of couse the Map created in sued in
another method in my work.
Since the ArrayLists (plural!) are in the Map, you retrieve them from the
Map.
The variable in question will not be in scope in another method anyway,
so
your reasoning is not applicable. It also will hold only /one/ of the
Lists; how do you figure on retrieving the others?
for some particular reasons and the call to this method is made in the
first loop of my example but is not provided here as this method was not
necessary to explain my particular problem.
And you haven't answered why the map isAgain Lew the code provided he is not the whyole code of my application ; it
Map <Integer, ArrayList <<String>>
instead of
Map <Integer, List <Integer>>
. Why is it so necessary to store Strings in the List, and ArrayLists in
the Map?
is only somehow just alike to clearly expose my problem which was
successful done as the readers have provided the fix ; in this context the
whole code was not relevant ; in my acctual application I am reading
strings in a text file line by line ; each line contains strings separated
by coma ; when I read the file I store the strings in an ArrayList and this
ArrayList as the value of the map record with the line number as the key.
I store the strings for later process that I do not want to initiate unless
whole data of my file is proved to be correct (data is supposed to have
some particular meaning) ; if the data is ok then I proceed by iterating
the map basically loop 2 of my example.
Daniel.
--
Daniel Moyne
(Nulix)---------------------------------------------------------
Distribution : Ubuntu Feisty \\|||// Machine : x86_64
kernel 2.6.20-16-generic / --- \ ATI Radeon X300
KDE 3.5.7 (' o-o ')
----------------------------------------oOO-(_)-OOo--------------------------
.
- Follow-Ups:
- Re: question
- From: Lew
- Re: question
- References:
- [Map<Integer,ArrayList<String>>]question
- From: Daniel Moyne
- Re: question
- From: Peter F
- Re: question
- From: Daniel Moyne
- Re: question
- From: Peter Fourneau
- Re: question
- From: Daniel Moyne
- Re: question
- From: Lew
- Re: question
- From: Daniel Moyne
- Re: question
- From: Lew
- [Map<Integer,ArrayList<String>>]question
- Prev by Date: Re: encrypted source file support in jdk?
- Next by Date: Re: question
- Previous by thread: Re: question
- Next by thread: Re: question
- Index(es):
Relevant Pages
|