final class NonEmptySet[A] extends AnyRef
- Self Type
- NonEmptySet[A]
- Alphabetic
- By Inheritance
- NonEmptySet
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(elem: A): NonEmptySet[A]
Creates a new
NonEmptySetwith an additional element, unless the element is already present.Creates a new
NonEmptySetwith an additional element, unless the element is already present.- elem
the element to be added
- returns
a new set that contains all elements of this set and that also contains
elem.
-
def
++(elems: Iterable[A]): NonEmptySet[A]
Creates a new
NonEmptySetby adding all elements contained in another collection to thisNonEmptySet, omitting duplicates.Creates a new
NonEmptySetby adding all elements contained in another collection to thisNonEmptySet, omitting duplicates.This method takes a collection of elements and adds all elements, omitting duplicates, into
NonEmptySet.Example:
scala> val a = NonEmptySet(1, 2) ++ NonEmptySet(2, "a") a: zio.prelude.NonEmptySet[Any] = NonEmptySet(1, 2, a)
- elems
the collection containing the elements to add.
- returns
a new
NonEmptySetwith the given elements added, omitting duplicates.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
add(elem: A): NonEmptySet[A]
Adds the
elemto thisNonEmptySet.Adds the
elemto thisNonEmptySet. Alias for+. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(that: Any): Boolean
- Definition Classes
- NonEmptySet → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatten[B](implicit ev: <:<[A, NonEmptySet[B]]): NonEmptySet[B]
Flattens a
NonEmptySetofNonEmptySetvalues into a singleNonEmptySet. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- NonEmptySet → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (A) ⇒ B): NonEmptySet[B]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
peel: (A, Set[A])
Returns an element of this
NonEmptySetand the remainder, which is a (possibly empty)Set.Returns an element of this
NonEmptySetand the remainder, which is a (possibly empty)Set.- Annotations
- @inline()
-
def
peelNonEmpty: (A, Option[NonEmptySet[A]])
Returns an element of this
NonEmptySetand the remainder orNone, if the remainder is empty. -
def
remove(elem: A): Set[A]
Removes the
elemfrom thisNonEmptySet.Removes the
elemfrom thisNonEmptySet. Alias for-. -
def
removeNonEmpty(elem: A): Option[NonEmptySet[A]]
removes the elem from
NonEmptySet, returning Some(NonEmptySet) if there's anything left, otherwise None -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tailNonEmpty: Option[NonEmptySet[A]]
Returns the tail of this
NonEmptySetif it exists orNoneotherwise. -
def
toNonEmptyChunk: NonEmptyChunk[A]
Converts this
NonEmptySetto aNonEmptyChunk. -
def
toNonEmptyList: NonEmptyList[A]
Converts this
NonEmptySetto aNonEmptyList. -
def
toSet: Set[A]
Converts this
NonEmptySetto aSet. -
def
toString(): String
- Definition Classes
- NonEmptySet → AnyRef → Any
-
def
union(that: Set[A]): NonEmptySet[A]
Computes the union between of
NonEmptySetand another set.Computes the union between of
NonEmptySetand another set.- that
the set to form the union with.
- returns
a new
NonEmptySetconsisting of all elements that are in this set or in the given setthat.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()