Hi The following statements are from the API: "The List interface places additional stipulations, beyond those specified in the Collection interface, on the contracts of the iterator, add, remove, equals, and hashCode methods." My question is: How can the 'list' interface place additional stipulations on methods in the 'Collection' interface? I ask because so far I was under the impression that all methods in interfaces are 'dummy' and must be implemented explicitly by classes. Is this not correct?
If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.
This excerpt makes me to think that the textual description of how an interface must be implemented is what was called "placing restrictions" in your question.