com.r3corda.core.utilities / NonEmptySet

NonEmptySet

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. The underlying set is exposed for Kryo to access, but should not be accessed directly.



Types

Iterator inner class Iterator<out T, T> : MutableIterator<T>

Constructors

<init> NonEmptySet(initial: 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. The underlying set is exposed for Kryo to access, but should not be accessed directly.

Properties

size val size: Int

Functions

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