I have one ArrayList of Integer, extracted from a MapDB map, with this code:
ArrayList<Integer> idOffUser=users.get(myUser).getOffers();
It's a list of ids.
I have another ConcurrentNavigableMap from the same db, called auctions. In this map for every object which mantains I have an ArrayList of Integer, called offId, which has a list of unique integers, each one representing a specific offer. Every offId it's reffered to a specific object (an auction) of that map.
In every offId there can be (or not!) a match for some elements of idOffUser, so I need to extract the objects in auctions whose offId has at least a match with an element of idOffUser, excluding the duplicates, because I only need to know in what auction an user put an offer, but an user can put multiple offers in an auction.
As a result of this method I need to have an ArrayList with every auction object in which an user put at least an offer.
So far, I know I can access an arraylist of offers in auctions in this way:
for (Auction key : auctions.values())
key.getOffId();