Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /**
  2. * renvoie le compte d'une banque de numéro donné
  3. *
  4. * @param numéro
  5. * numéro du compte recherché
  6. * @return compte bancaire ou null s'il n'existe pas
  7. */
  8. public CompteBancaire getCompte(String numéro){
  9. Set<String> setInt = comptes.keySet();
  10. Iterator<String> it = setInt.iterator();
  11. while(it.hasNext()){
  12. if (this.comptes.containsKey(numéro)) {
  13. return this.comptes.get(numéro);
  14. }
  15. }
  16. return null;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement