Packages

object NonEmpty

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NonEmpty
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def apply[Fct, A, C <: Iterable[A]](into: Fct, hd: A, tl: A*)(implicit fct: (Fct) => Factory[A, C]): NonEmpty[C]

    NonEmpty(List, 1, 2, 3) : NonEmpty[List[Int]] // with (1, 2, 3) as elements
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def equiv[F[_], A]: ===[NonEmpty[F[A]], NonEmptyF[F, A]]

    Usable proof that NonEmptyF is actually equivalent to its NonEmpty parent type, not a strict subtype.

    Usable proof that NonEmptyF is actually equivalent to its NonEmpty parent type, not a strict subtype. (We want Scala to treat it as a strict subtype, usually, so that the type will be deconstructed by partial-unification correctly.)

  10. final def from[Self](self: Self with Iterable[_]): Option[NonEmpty[Self]]

    Like unapply, but when you don't want pattern matching.

  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def mk[Fct, A, C[X] <: Iterable[X]](into: Fct, hd: A, tl: A*)(implicit fct: (Fct) => Factory[A, C[A]]): NonEmpty[C[A]]

    Like apply, but because A occurs directly in the result type, if the call to mk has an expected A type, hd and tl will have that expected type as well.

    Like apply, but because A occurs directly in the result type, if the call to mk has an expected A type, hd and tl will have that expected type as well. Particularly useful for Sets, as expected type can widen the element type of the produced set, and _ as an argument, because the lambda argument type can be inferred from the expected result type.

    However, strictly speaking, it is less general than apply; for example, it doesn't work on Maps at all. So it should only be used when you need its particular type inference behavior. See "mk" should tests in NonEmptySpec.scala for examples where mk works but apply doesn't.

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. def subtype[A]: <~<[NonEmpty[A], A]

    Usable proof that NonEmpty is a subtype of its argument.

    Usable proof that NonEmpty is a subtype of its argument. (We cannot put this in an upper-bound, because that would prevent us from adding implicit methods that replace the stdlib ones.)

  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. def unapply[Self](self: Self with Iterable[_]): Option[NonEmpty[Self]]

    In pattern matching, think of NonEmpty as a sub-case-class of every imm.Iterable; matching case NonEmpty(ne) adds the non-empty type to ne if the pattern matches.

    In pattern matching, think of NonEmpty as a sub-case-class of every imm.Iterable; matching case NonEmpty(ne) adds the non-empty type to ne if the pattern matches.

    You will get an unchecked warning if the selector is not statically of an immutable type. So scala.collection.Seq will not work.

    The type-checker will not permit you to apply this to a value that already has the NonEmpty type, so don't worry about redundant checks here.

  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped