T
- set element typepublic class SmallSet<T> extends AbstractSet<T>
Constructor and Description |
---|
SmallSet()
default constructor
|
SmallSet(Collection<T> collection) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T t) |
boolean |
contains(Object o) |
Iterator<T> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
String |
toString() |
equals, hashCode, removeAll
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray
addAll, clear, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public SmallSet()
public SmallSet(Collection<T> collection)
collection
- collection to copypublic boolean add(T t)
add
in interface Collection<T>
add
in interface Set<T>
add
in class AbstractCollection<T>
public boolean remove(Object o)
remove
in interface Collection<T>
remove
in interface Set<T>
remove
in class AbstractCollection<T>
public boolean contains(Object o)
contains
in interface Collection<T>
contains
in interface Set<T>
contains
in class AbstractCollection<T>
public int size()
size
in interface Collection<T>
size
in interface Set<T>
size
in class AbstractCollection<T>
public String toString()
toString
in class AbstractCollection<T>
Copyright © 2020 The University of Manchester. All rights reserved.