Deque的方法和继承自Queue的方法

Deque's methods and the methods inherited from Queue

Deque's javadoc 中所述,Last 方法(addLastremoveLast 等... ) 完全等同于 Queue 方法。所以我不清楚他们为什么在 Deque 接口中声明 Last 方法。为什么不在 Deque 接口中使用 Queue 的方法并声明唯一的 First 方法?

调用 addLast 比调用 add 更清楚你的意图。包含调用 addFirstaddLast 的代码比包含调用 addFirst 添加 add.

的代码更容易理解