Package de.dis2011.menu

Source Code of de.dis2011.menu.HouseSelectionMenu

package de.dis2011.menu;

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

import de.dis2011.data.Haus;

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

Related Classes of de.dis2011.menu.HouseSelectionMenu

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.