B4J Question Linked lists in collectionextra

afields

Member
Licensed User
Hello to all!.
i'm creating a job that consist in a series of orders for printing. the job manager is very simple with only the delete option ( to delete one entry ) and the swap option ( to swap entry up or down).
i had though to use a linked list and after searching i've tried to use the collectionExtra library which by the way is for android but i've also worked with it in b4j.
however... when i debug i see what it seens to be 2 methods that are not public (but are usually used in linked list ). they are Next and Prev.
So my question is:
using the for each or for..next and inside get is the only method to read the list?
what if beeing in a element i would need to go to the next element ( without using the index of the cycle?)
shell i need to always know the item where i am?
Thank to all!
 

afields

Member
Licensed User
hello to all!. after having made some test i came to the conclusion that if the regular list does not have such methods ( like the one's that i've pointed Next, Prev and swap) i can always "extend" the regular list to have also those methods specially the swap one because i want to give the option to relocate an order up or down. so a simple question like the one that you've done is enough to resolve the problem!
thank you erel. Solved!
 
Last edited:
Upvote 0
Top