NonEmptySet.of - corda

corda / net.corda.core.utilities / NonEmptySet / of

# of

`@JvmStatic fun <T> of(element: T): NonEmptySet<T>`

Returns a singleton set containing element. This behaves the same as Collections.singleton but returns a NonEmptySet for the extra type-safety.

`@JvmStatic fun <T> of(first: T, second: T, vararg rest: T): NonEmptySet<T>`

Returns a non-empty set containing the given elements, minus duplicates, in the order each was specified.