Scalactic is brought to you by:

object End

Object that can be used as an endpoint for NonEmptyList construction expressions that use the cons (::) operator.

Here's an example:

scala> 1 :: 2 :: 3 :: End
res0: org.scalactic.NonEmptyList[Int] = NonEmptyList(1, 2, 3)

Note that unlike Nil, which is an instance of List[Nothing], End is not an instance of NonEmptyList[Nothing], because there is no empty NonEmptyList:

scala> Nil.isInstanceOf[List[_]]
res0: Boolean = true

scala> End.isInstanceOf[NonEmptyList[_]]
res1: Boolean = false

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

Value Members

  1. def ::[T](element: T): NonEmptyList[T]

    A :: operator that serves to start a NonEmptyList construction expression.

    A :: operator that serves to start a NonEmptyList construction expression.

    The result of calling this method will always be a NonEmptyList of length 1. Here's an example:

    scala> 1 :: End
    res0: org.scalactic.NonEmptyList[Int] = NonEmptyList(1)
    

  2. def toString(): String

    Returns "End".

    Returns "End".

    Definition Classes
    End → AnyRef → Any