Exemplo n.º 1
0
 public Rental getRented() {
   for (Rental rent : rentals) {
     if (rent.isActive()) {
       return rent;
     }
   }
   return null;
 }
Exemplo n.º 2
0
 public boolean clearRented() {
   for (Rental rent : rentals) {
     if (rent.isActive()) {
       rent.clearRented();
       return true;
     }
   }
   return false;
 }
Exemplo n.º 3
0
 // Methods
 public boolean isAvailable() throws NullPointerException {
   // if ( rentals != null)
   for (Rental rent : rentals) {
     if (rent.isActive()) {
       return false;
     }
   }
   return true;
 }