Determine if there are conflicts in set
<p>I have a Java <code>HashMap</code> containing 5 entries. Mapped to each entry is an object containing:</p>

<ul>
<li>an x value</li>
<li>a y value</li>
<li>a length</li>
<li>an orientation (either "horizontal" or "vertical")</li>
</ul>

<p>Think of the game battleship with a 10 x 10 board. The x / y coordinates in each entry corresponds to the top left corner of a ship on the board, and the length and orientation correspond, as one would expect, to the ships length and orientation from that point. </p>

<p>I'm trying to think of a way to rip through the 5 ships and check if there are any "overlapping ships", known as <em>conflicts</em>, on the board. I can't figure out how to do this. Any help would be much appreciated.</p>
