Question: I'm currently implementing a rather large interface and some of its methods are not applicable to the implementation.

Should I do something akin to:

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

```

or just silently ignore it, doing nothing:

```
public void fooMethod() {
}

```

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).

Is there a general rule regarding this?

Answer: 
I think that simply depends on the contract defined by the method. 

If for example "remove" is not supported by your "List" implementation, you should throw an exception to indicate that this behavior is missing because the client relies on an expected result.

If the feature is optional in the sense that the **contract** says for example "this method should inform the user about an ongoing activity" you're free to make a dummy implementation.
UnsupportedOperationException is better. Otherwise client code cannot distinguish the method is availble or not.