class NonEmptySet<T> : MutableSet<T>
A set which is constrained to ensure it can never be empty. An initial value must be provided at construction, and attempting to remove the last element will cause an IllegalStateException.
Iterator |
inner class Iterator<T, T> : MutableIterator<T> |
<init> |
NonEmptySet(initial: T, set: MutableSet<T> = mutableSetOf()) A set which is constrained to ensure it can never be empty. An initial value must be provided at construction, and attempting to remove the last element will cause an IllegalStateException. |
size |
val size: Int |
add |
fun add(element: T): Boolean |
addAll |
fun addAll(elements: Collection<T>): Boolean |
clear |
fun clear(): Nothing |
contains |
fun contains(element: T): Boolean |
containsAll |
fun containsAll(elements: Collection<T>): Boolean |
equals |
fun equals(other: Any?): Boolean |
hashCode |
fun hashCode(): Int |
isEmpty |
fun isEmpty(): Boolean |
iterator |
fun iterator(): MutableIterator<T> |
remove |
fun remove(element: T): Boolean |
removeAll |
fun removeAll(elements: Collection<T>): Boolean |
retainAll |
fun retainAll(elements: Collection<T>): Boolean |
toString |
fun toString(): String |