Isn't the Java LinkedList API redundant?

api, collections, java, linked-list

Solution

The `LinkedList` class implements the interfaces `List` and `Deque`. So the class needs to implement those four methods even though, you're right, they do quite the same.

By the way, the `LinkedList` is not the API. If you use an interface, like

List<String> list = new LinkedList<>();

for example, then you won't see the methods `addLast`, `offer` and `offerLast`.

Problem

Don't the methods `add`, `addLast`, `offer` and `offerLast` in the Java LinkedList class perform the same thing? If so, why does the API design trade off brevity for redundancy?

Original source