/** * Prüfe, ob eine Ressource für ein bestimmten Appointment reserviert ist. * * @param alloc * @param when * @return <code>true</code>, wenn die Ressource reserviert ist. <code>false</code> sonst */ private boolean isReserved(Allocatable alloc, Appointment when) { Reservation reservation = when.getReservation(); Appointment[] restrictions = reservation.getRestriction(alloc); for (int restIt = 0, restLen = restrictions.length; restIt < restLen; restIt++) { if (when.equals(restrictions[restIt])) return true; } return (restrictions.length == 0); }