ChaotiCc

Untitled

Apr 12th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void enConflitAvecTous(){
  2.     Relation enConflit = estEnConflitAvec().clone();
  3.     Ensemble coursEnConflitAvecTous = new Ensemble();
  4.     Iterator<Elt> it = enConflit.depart().iterator();
  5.     while (it.hasNext()){
  6.         boolean enConflitAvecTous = true;
  7.         Elt cours = it.next();
  8.         Iterator<Elt> it2 = enConflit.arrivee().iterator();
  9.         while (it2.hasNext()){
  10.             Elt coursEnParcours = it2.next();
  11.             Couple c = new Couple(cours, coursEnParcours);
  12.             if (!enConflit.contient(c)){
  13.                 enConflitAvecTous = false;
  14.             }
  15.         }
  16.         if (enConflitAvecTous){
  17.             coursEnConflitAvecTous.ajouter(cours);
  18.         }
  19.     }
  20.     System.out.println("Cours en conflit avec tous les autres : ");
  21.     lister(coursEnConflitAvecTous, "COURS");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment