Packages

final case class OneOrMore[+A](head: A, tail: Iterable[A]) extends NonEmpty[A] with NonEmptyOps[A, OneOrMore, List] with Product with Serializable

Collection of at least one element.

Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OneOrMore
  2. Serializable
  3. Product
  4. Equals
  5. NonEmptyOps
  6. ShorteningEitherOps
  7. ShorteningOps
  8. LengtheningOps
  9. UnchangedSizeOps
  10. NonEmpty
  11. AnyRef
  12. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new OneOrMore(head: A, tail: Iterable[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toany2stringadd[OneOrMore[A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. final def ++[B >: A](that: NonEmpty[B]): OneOrMore[B]

    Alias for concat

    Alias for concat

    Definition Classes
    LengtheningOps
  5. final def ++[B >: A](that: IterableOnce[B]): OneOrMore[B]

    Alias for concat

    Alias for concat

    Definition Classes
    LengtheningOps
  6. final def ++:[B >: A](prefix: NonEmpty[B]): OneOrMore[B]

    Alias for prependedAll

    Alias for prependedAll

    Definition Classes
    LengtheningOps
  7. final def ++:[B >: A](prefix: IterableOnce[B]): OneOrMore[B]

    Alias for prependedAll

    Alias for prependedAll

    Definition Classes
    LengtheningOps
  8. final def +:[B >: A](elem: B): OneOrMore[B]

    Alias for prepended

    Alias for prepended

    Definition Classes
    LengtheningOps
  9. def ->[B](y: B): (OneOrMore[A], B)
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toArrowAssoc[OneOrMore[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  10. final def :+[B >: A](elem: B): OneOrMore[B]

    Alias for appended

    Alias for appended

    Definition Classes
    LengtheningOps
  11. final def :++[B >: A](suffix: NonEmpty[B]): OneOrMore[B]

    Alias for appendedAll

    Alias for appendedAll

    Definition Classes
    LengtheningOps
  12. final def :++[B >: A](suffix: IterableOnce[B]): OneOrMore[B]

    Alias for appendedAll

    Alias for appendedAll

    Definition Classes
    LengtheningOps
  13. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def appended[B >: A](elem: B): OneOrMore[B]

    Creates a new collection with the elements of this collection and elem appended.

    Creates a new collection with the elements of this collection and elem appended.

    Definition Classes
    OneOrMoreLengtheningOps
  15. final def appendedAll[B >: A](suffix: NonEmpty[B]): OneOrMore[B]
    Definition Classes
    LengtheningOps
  16. final def appendedAll[B >: A](suffix: IterableOnce[B]): OneOrMore[B]
    Definition Classes
    LengtheningOps
  17. def apply(index: Int): A

    The element at index starting with 0 looked up in a non-safe way.

    The element at index starting with 0 looked up in a non-safe way.

    Definition Classes
    OneOrMoreUnchangedSizeOps
    Exceptions thrown

    IndexOutOfBoundsException if index is negative or greater or equal to this collection's size.

  18. def apply[B >: A](index: Int, more: Iterable[B], start: Int): B
    Attributes
    protected
    Definition Classes
    UnchangedSizeOps
  19. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  21. final def collect[B](pf: PartialFunction[A, B]): List[B]

    Creates a List with all elements of this collection that satisfy pf

    Creates a List with all elements of this collection that satisfy pf

    Definition Classes
    ShorteningOps
  22. def collectEither[B](pf: PartialFunction[A, B]): Either[List[B], OneOrMore[B]]

    Same as collect but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Same as collect but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Definition Classes
    ShorteningEitherOps
  23. def concat[B >: A](suffix: IterableOnce[B]): OneOrMore[B]

    Concatenates the elements of this collection and those of suffix into a new collection.

    Concatenates the elements of this collection and those of suffix into a new collection.

    Definition Classes
    LengtheningOps
  24. def contains[B >: A](elem: B): Boolean

    Whether elem is included in this collection.

    Whether elem is included in this collection.

    Definition Classes
    UnchangedSizeOps
  25. def ensuring(cond: (OneOrMore[A]) => Boolean, msg: => Any): OneOrMore[A]
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toEnsuring[OneOrMore[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  26. def ensuring(cond: (OneOrMore[A]) => Boolean): OneOrMore[A]
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toEnsuring[OneOrMore[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  27. def ensuring(cond: Boolean, msg: => Any): OneOrMore[A]
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toEnsuring[OneOrMore[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. def ensuring(cond: Boolean): OneOrMore[A]
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toEnsuring[OneOrMore[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  29. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def exists(p: (A) => Boolean): Boolean

    Whether an element satisfying the predicate p exists.

    Whether an element satisfying the predicate p exists.

    Definition Classes
    UnchangedSizeOps
  31. final def filter(p: (A) => Boolean): List[A]

    Creates a List with all elements of this collection that satisfy the predicate p

    Creates a List with all elements of this collection that satisfy the predicate p

    Definition Classes
    ShorteningOps
  32. def filterEither(p: (A) => Boolean): Either[List[A], OneOrMore[A]]

    Same as filter but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Same as filter but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Definition Classes
    ShorteningEitherOps
  33. final def filterNot(p: (A) => Boolean): List[A]

    Creates a List with all elements of this collection that don't satisfy the predicate p

    Creates a List with all elements of this collection that don't satisfy the predicate p

    Definition Classes
    ShorteningOps
  34. def filterNotEither(p: (A) => Boolean): Either[List[A], OneOrMore[A]]

    Same as filterNot but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Same as filterNot but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Definition Classes
    ShorteningEitherOps
  35. def find(p: (A) => Boolean): Option[A]

    Finds an element satisfying the predicate p if any.

    Finds an element satisfying the predicate p if any.

    Definition Classes
    OneOrMoreUnchangedSizeOps
  36. final def flatMap[B](f: (A) => IterableOnce[B]): List[B]

    Creates a List by applying f to all elements of this collection and using the elements of every result.

    Creates a List by applying f to all elements of this collection and using the elements of every result.

    Definition Classes
    ShorteningOps
  37. final def flatMapEither[B](f: (A) => IterableOnce[B]): Either[List[B], OneOrMore[B]]

    Same as flatMap but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Same as flatMap but creates a collection of the same type and returns it in a Right unless the number of remaining elements is too small in which case it escapes to a Left[List].

    Definition Classes
    ShorteningEitherOps
  38. def foldLeft[B](zero: B)(f: (B, A) => B): B

    Applies f to a start value and all elements of this collection, going left to right.

    Applies f to a start value and all elements of this collection, going left to right.

    Definition Classes
    UnchangedSizeOps
  39. def forall(p: (A) => Boolean): Boolean

    Whether all elements satisfy the predicate p.

    Whether all elements satisfy the predicate p.

    Definition Classes
    OneOrMoreUnchangedSizeOps
  40. def foreach[U](f: (A) => U): Unit

    Calls f on all elements of this collection for side effects.

    Calls f on all elements of this collection for side effects.

    Definition Classes
    OneOrMoreUnchangedSizeOps
  41. def get(index: Int): Option[A]

    Gets the element at index if any.

    Gets the element at index if any.

    Definition Classes
    UnchangedSizeOps
  42. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  43. val head: A

    The first element.

    The first element.

    Definition Classes
    OneOrMoreUnchangedSizeOps
  44. def isDefinedAt(index: Int): Boolean

    Whether an element at index exists.

    Whether an element at index exists.

    Definition Classes
    OneOrMoreUnchangedSizeOps
  45. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  46. def iterator: Iterator[A]

    Iterates over all elements of this collection.

    Iterates over all elements of this collection.

    Definition Classes
    OneOrMoreUnchangedSizeOpsNonEmpty
  47. def map[B](f: (A) => B): OneOrMore[B]

    Builds a new collection by applying a function to all elements of this collection.

    Builds a new collection by applying a function to all elements of this collection.

    Definition Classes
    OneOrMoreUnchangedSizeOps
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. def newConditionalBuilder[B]: Conditional[B, OneOrMore, List]
    Attributes
    protected
    Definition Classes
    OneOrMoreShorteningEitherOps
  50. def newEscapingBuilder[B]: Escaping[B, List]
    Attributes
    protected
    Definition Classes
    OneOrMoreShorteningOps
  51. def newUnsafeBuilder[B]: Unsafe[B, OneOrMore]
    Attributes
    protected
    Definition Classes
    OneOrMoreUnchangedSizeOps
  52. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  53. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  54. def prepended[B >: A](elem: B): OneOrMore[B]

    Creates a new collection with elem as its first element followed by the elements of this collection.

    Creates a new collection with elem as its first element followed by the elements of this collection.

    Definition Classes
    OneOrMoreLengtheningOps
  55. final def prependedAll[B >: A](prefix: NonEmpty[B]): OneOrMore[B]
    Definition Classes
    LengtheningOps
  56. final def prependedAll[B >: A](prefix: IterableOnce[B]): OneOrMore[B]
    Definition Classes
    LengtheningOps
  57. def productElementNames: Iterator[String]
    Definition Classes
    Product
  58. def reduceLeft[B >: A](f: (B, A) => B): B

    Applies f to all elements of this collection, going left to right.

    Applies f to all elements of this collection, going left to right.

    Definition Classes
    UnchangedSizeOps
  59. final def reverse: OneOrMore[A]
    Definition Classes
    UnchangedSizeOps
  60. def size: Int

    The number of elements in this collection.

    The number of elements in this collection.

    Definition Classes
    OneOrMoreUnchangedSizeOps
  61. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  62. val tail: Iterable[A]
  63. final def toList: List[A]
    Definition Classes
    UnchangedSizeOps
  64. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  65. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  66. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  67. final def zip[B](that: NonEmpty[B]): OneOrMore[(A, B)]
    Definition Classes
    UnchangedSizeOps
  68. final def zip[B](that: IterableOnce[B]): OneOrMore[(A, B)]
    Definition Classes
    UnchangedSizeOps
  69. final def zipWithIndex: OneOrMore[(A, Int)]
    Definition Classes
    UnchangedSizeOps

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toStringFormat[OneOrMore[A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (OneOrMore[A], B)
    Implicit
    This member is added by an implicit conversion from OneOrMore[A] toArrowAssoc[OneOrMore[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from NonEmptyOps[A, OneOrMore, List]

Inherited from ShorteningEitherOps[A, OneOrMore, List]

Inherited from ShorteningOps[A, OneOrMore, List]

Inherited from LengtheningOps[A, OneOrMore]

Inherited from UnchangedSizeOps[A, OneOrMore]

Inherited from NonEmpty[A]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromOneOrMore[A] to any2stringadd[OneOrMore[A]]

Inherited by implicit conversion StringFormat fromOneOrMore[A] to StringFormat[OneOrMore[A]]

Inherited by implicit conversion Ensuring fromOneOrMore[A] to Ensuring[OneOrMore[A]]

Inherited by implicit conversion ArrowAssoc fromOneOrMore[A] to ArrowAssoc[OneOrMore[A]]

Ungrouped