Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions 5ad0cc ... vs cff7b0 ... for ruralHouses/src/domain/RuralHouse.java

Diff revisions: vs.
  @@ -130,7 +130,17 @@
130 130 return availableOffers;
131 131 }
132 132
133 -
133 + public Vector<Offer> getAllOffers() {
134 + Vector<Offer> availableOffers=new Vector<Offer>();
135 + Iterator<Offer> e=offers.iterator();
136 + Offer offer;
137 + while (e.hasNext()){
138 + offer=e.next();
139 + if ( (offer.getBooking()==null) )
140 + availableOffers.add(offer);
141 + }
142 + return availableOffers;
143 + }
134 144 /**
135 145 * This method obtains the offer that match exactly with a given dates that has not been booked
136 146 *
  @@ -149,6 +159,7 @@
149 159 return null;
150 160 }
151 161
162 +
152 163 public Offer overlapsWith( Date firstDay, Date lastDay) {
153 164
154 165 Iterator<Offer> e=offers.iterator();