Methods not applicable for the implementation of an interface: throw Exception or ignore silently?
<p>I'm currently implementing a rather large interface and some of its methods are not applicable to the implementation.</p>

<p>Should I do something akin to:</p>

<pre><code>/**
 * @throws UnsupportedOperationException always. This method is not applicable.
 */
public void fooMethod() {
  throw new UnsupportedOperationException("This method is not applicable for this implementation.");
}
</code></pre>

<p>or just silently ignore it, doing nothing:</p>

<pre><code>public void fooMethod() {
}
</code></pre>

<p>The former way would alert a user of the class that it doesn't do a portion of what the interface provides, but might perhaps clash with legacy code where the class is used as a drop-in replacement (which it isn't, though).</p>

<p>Is there a general rule regarding this?</p>
