12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
- package kontakte.model;
-
- import java.util.HashMap;
-
- /**
- *
- * @author nobody
- */
- public class Model
- {
- public HashMap<String, Kontakt> kontaktliste;
- public Model()
- {
- kontaktliste = new HashMap<>();
- }
-
- public void addKontakt(Kontakt k)
- {
- kontaktliste.put(k.name, k);
- }
-
- public void deleteKontakt(Kontakt k)
- {
- kontaktliste.remove(k.name);
- }
-
- public Kontakt getKontakt(String name)
- {
- return kontaktliste.get(name);
- }
- }
|