Sorry, I thought this was an inheritance question: it was an ArrayList question all along!
Ok, my problem is more specific than I thought. So I have two families of
One way to do that is by casting to ArrayList first:
ArrayList cards = (ArrayList)(ArrayList>) (pokerCardObjects);
Another alternatives without casting:
With streams:
ArrayList cards = pokerCardObjects.stream().collect(Collectors.toCollection(ArrayList::new);
Or creating a new ArrayList:
ArrayList cards = new ArrayList<>(pokerCardObjects);