Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public static Collection<Denombrement> cartesDenombrees(Collection<? extends Carte> desCartes) {
  2. ArrayList<Denombrement> cartesDenombrement = new ArrayList<Denombrement>();
  3. Denombrement d;
  4.  
  5. for (Carte c : desCartes) {
  6. d = new Denombrement(c,Collections.frequency(desCartes,c));
  7. if (!cartesDenombrement.contains(d))
  8. cartesDenombrement.add(d);
  9. }
  10.  
  11. return cartesDenombrement;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement