📜  Set 接口 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:43.084000             🧑  作者: Mango

代码示例1
The Set Interface
A Set is a Collection that cannot contain duplicate elements. It models the mathematical set abstraction.
The Set interface contains only methods inherited from Collection and adds the restriction that duplicate elements are prohibited.
Set also adds a stronger contract on the behavior of the equals and hashCode operations, allowing Set instances to be compared meaningfully even if their implementation types differ.