title: Java dates period compare
body: <p>I would like to create a function in java that would do the following:</p>
  
  <ol>
  <li>Get a list of Objects in a vector with fields <code>startDate</code>, <code>endDate</code></li>
  <li>Get a second list of Objects in a vector with fields <code>startDate</code>, <code>endDate</code>
  and return <code>true</code> or <code>false</code> if for each date period from the first list (<code>startDate</code> to <code>endDate</code>) , there is a corresponding date period in the second list.</li>
  </ol>
  
  <p>However, the date period in the second list could be filled by consecutive dates.
  For example List1 (with only one object): <code>Object1</code> (Start date = 01/01/2010 , End date = 01/01/2013)</p>
  
  <p>If provided with List2 (2 objects) : <code>Object1</code> (Start date = 01/01/2010, End date = 01/03/2010) <code>Object2</code> (Start date = 01/03/2010 End date = 01/01/2013)
  should return <code>true</code></p>