Click here to Skip to main content
15,908,111 members
Home / Discussions / Java
   

Java

 
GeneralRe: iterator previous() add() Pin
prithaa9-Feb-12 17:34
prithaa9-Feb-12 17:34 
GeneralRe: iterator previous() add() Pin
TorstenH.9-Feb-12 20:32
TorstenH.9-Feb-12 20:32 
GeneralRe: iterator previous() add() Pin
prithaa9-Feb-12 21:41
prithaa9-Feb-12 21:41 
GeneralRe: iterator previous() add() Pin
David Skelly9-Feb-12 22:29
David Skelly9-Feb-12 22:29 
GeneralRe: iterator previous() add() Pin
TorstenH.9-Feb-12 23:41
TorstenH.9-Feb-12 23:41 
GeneralRe: iterator previous() add() Pin
BobJanova10-Feb-12 0:29
BobJanova10-Feb-12 0:29 
GeneralRe: iterator previous() add() Pin
TorstenH.12-Feb-12 21:20
TorstenH.12-Feb-12 21:20 
GeneralRe: iterator previous() add() Pin
David Skelly10-Feb-12 3:43
David Skelly10-Feb-12 3:43 
TorstenH. wrote:
To get a real order according to what you expect/want the objects to be in the
list you need to sort them


No, I don't. I can add items to the list at any position I want. One way to do this is to use the overloaded add method, which allows me to specify the index position at which I want to add the item.

This allows me to add items to the list in any arbitrary order I want, even if it does not correspond to a natural sort order. For example, I can add numbers in the order 3, 1, 4, 1, 9 which are the digits of pi in sequence. But wait! I hear you cry, that's not right. So now I go back and add the digit 5 into my list at index 4 to make 3, 1, 4, 1, 5, 9. If I add the number at the end, it's wrong. If I sort it, it's wrong. I have to add it into the correct position to get the order I want and expect.
GeneralRe: iterator previous() add() Pin
TorstenH.12-Feb-12 21:18
TorstenH.12-Feb-12 21:18 
GeneralRe: iterator previous() add() Pin
David Skelly12-Feb-12 22:32
David Skelly12-Feb-12 22:32 
GeneralRe: iterator previous() add() Pin
TorstenH.13-Feb-12 4:14
TorstenH.13-Feb-12 4:14 
GeneralRe: iterator previous() add() Pin
David Skelly19-Feb-12 22:20
David Skelly19-Feb-12 22:20 
QuestionHELP Pin
reemamjd8-Feb-12 19:02
reemamjd8-Feb-12 19:02 
AnswerRe: HELP Pin
thatraja8-Feb-12 21:03
professionalthatraja8-Feb-12 21:03 
QuestionEJB Pin
V.7-Feb-12 22:21
professionalV.7-Feb-12 22:21 
AnswerRe: EJB Pin
Richard MacCutchan7-Feb-12 22:42
mveRichard MacCutchan7-Feb-12 22:42 
GeneralRe: EJB Pin
V.7-Feb-12 22:56
professionalV.7-Feb-12 22:56 
GeneralRe: EJB Pin
V.9-Feb-12 1:32
professionalV.9-Feb-12 1:32 
Questionabout java Pin
Sheetesh Kumar Dubey7-Feb-12 3:26
Sheetesh Kumar Dubey7-Feb-12 3:26 
AnswerRe: about java Pin
Richard MacCutchan7-Feb-12 4:55
mveRichard MacCutchan7-Feb-12 4:55 
AnswerRe: about java Pin
TorstenH.7-Feb-12 20:22
TorstenH.7-Feb-12 20:22 
Questionset database value to java script var on Js file Pin
swapnil666-Feb-12 1:48
swapnil666-Feb-12 1:48 
AnswerRe: set database value to java script var on Js file Pin
David Skelly6-Feb-12 22:12
David Skelly6-Feb-12 22:12 
QuestionRe: set database value to java script var on Js file Pin
swapnil667-Feb-12 22:53
swapnil667-Feb-12 22:53 
QuestionHow to manipulate voice information??????? Pin
Member 86168852-Feb-12 10:28
Member 86168852-Feb-12 10:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.