Package de.dis2011.menu

Source Code of de.dis2011.menu.AppartmentSelectionMenu

package de.dis2011.menu;

import java.util.Iterator;
import java.util.Set;

import de.dis2011.data.Wohnung;

/**
* Ein kleines Menü, dass alle Wohnungen aus einem Set zur Auswahl anzeigt
*/
public class AppartmentSelectionMenu extends Menu {
  public static final int BACK = -1;
 
  public AppartmentSelectionMenu(String title, Set<Wohnung> wohnungen) {
    super(title);
   
    Iterator<Wohnung> it = wohnungen.iterator();
    while(it.hasNext()) {
      Wohnung w = it.next();
      addEntry(w.getStrasse()+" "+w.getHausnummer()+", "+w.getPlz()+" "+w.getOrt(), w.getId());
    }
    addEntry("Zur√ºck", BACK);
  }
}
TOP

Related Classes of de.dis2011.menu.AppartmentSelectionMenu

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.