Reputation: 25
I would like to take the first entry of my collection and - after having used it - delete it from said collection. I haven't found anything in the API of Anylogic, only the possiblity to delete all entries at once (which I do not want to do). Is it possible to delete only one entry? And do the others change their index automatically?
Upvotes: 0
Views: 291
Reputation: 2213
Either change the collection type of LinkedList
and use:
collection.removeFirst();
Or keep it an array list and use:
collection.remove(0);
Upvotes: 1