basic methods for Sets
■ Here is where to find Set’s methods in the Java API.
|
|
HashSet |
TreeSet |
|
In the Collection interface |
.add(...), .addAll(...), .clear( ),
.contains(...),
.containsAll(...), .isEmpty(
), .iterator( ), .remove(...), .removeAll(...),
.retainAll(...), .size(
), .toArray( ), .toArray(...) |
|
|
In the class itself |
- - |
.first( ), .headSet(...), .last( ), .subSet(...), .tailSet(...) |