final case class Several[+A](head: A, _2: A, more: Iterable[A]) extends NonEmpty[A] with NonEmptyOps[A, Several, List] with Product with Serializable
Collection of at least two elements.
- Alphabetic
- By Inheritance
- Several
- Serializable
- Product
- Equals
- NonEmptyOps
- ShorteningEitherOps
- ShorteningOps
- LengtheningOps
- UnchangedSizeOps
- NonEmpty
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- final def ++[B >: A](that: NonEmpty[B]): Several[B]
Alias for
concat
Alias for
concat
- Definition Classes
- LengtheningOps
- final def ++[B >: A](that: IterableOnce[B]): Several[B]
Alias for
concat
Alias for
concat
- Definition Classes
- LengtheningOps
- final def ++:[B >: A](prefix: NonEmpty[B]): Several[B]
Alias for
prependedAll
Alias for
prependedAll
- Definition Classes
- LengtheningOps
- final def ++:[B >: A](prefix: IterableOnce[B]): Several[B]
Alias for
prependedAll
Alias for
prependedAll
- Definition Classes
- LengtheningOps
- final def +:[B >: A](elem: B): Several[B]
Alias for
prepended
Alias for
prepended
- Definition Classes
- LengtheningOps
- def ->[B](y: B): (Several[A], B)
- final def :+[B >: A](elem: B): Several[B]
Alias for
appended
Alias for
appended
- Definition Classes
- LengtheningOps
- final def :++[B >: A](suffix: NonEmpty[B]): Several[B]
Alias for
appendedAll
Alias for
appendedAll
- Definition Classes
- LengtheningOps
- final def :++[B >: A](suffix: IterableOnce[B]): Several[B]
Alias for
appendedAll
Alias for
appendedAll
- Definition Classes
- LengtheningOps
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val _2: A
- def appended[B >: A](elem: B): Several[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
- Several → LengtheningOps
- final def appendedAll[B >: A](suffix: NonEmpty[B]): Several[B]
- Definition Classes
- LengtheningOps
- final def appendedAll[B >: A](suffix: IterableOnce[B]): Several[B]
- Definition Classes
- LengtheningOps
- 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
- Several → UnchangedSizeOps
- Exceptions thrown
IndexOutOfBoundsException
ifindex
is negative or greater or equal to this collection's size.
- def apply[B >: A](index: Int, more: Iterable[B], start: Int): B
- Attributes
- protected
- Definition Classes
- UnchangedSizeOps
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def collect[B](pf: PartialFunction[A, B]): List[B]
Creates a
List
with all elements of this collection that satisfypf
Creates a
List
with all elements of this collection that satisfypf
- Definition Classes
- ShorteningOps
- def collectEither[B](pf: PartialFunction[A, B]): Either[List[B], Several[B]]
Same as
collect
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.Same as
collect
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.- Definition Classes
- ShorteningEitherOps
- def concat[B >: A](suffix: IterableOnce[B]): Several[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
- def contains[B >: A](elem: B): Boolean
Whether
elem
is included in this collection.Whether
elem
is included in this collection.- Definition Classes
- UnchangedSizeOps
- def ensuring(cond: (Several[A]) => Boolean, msg: => Any): Several[A]
- def ensuring(cond: (Several[A]) => Boolean): Several[A]
- def ensuring(cond: Boolean, msg: => Any): Several[A]
- def ensuring(cond: Boolean): Several[A]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- final def filter(p: (A) => Boolean): List[A]
Creates a
List
with all elements of this collection that satisfy the predicatep
Creates a
List
with all elements of this collection that satisfy the predicatep
- Definition Classes
- ShorteningOps
- def filterEither(p: (A) => Boolean): Either[List[A], Several[A]]
Same as
filter
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.Same as
filter
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.- Definition Classes
- ShorteningEitherOps
- final def filterNot(p: (A) => Boolean): List[A]
Creates a
List
with all elements of this collection that don't satisfy the predicatep
Creates a
List
with all elements of this collection that don't satisfy the predicatep
- Definition Classes
- ShorteningOps
- def filterNotEither(p: (A) => Boolean): Either[List[A], Several[A]]
Same as
filterNot
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.Same as
filterNot
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.- Definition Classes
- ShorteningEitherOps
- 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
- Several → UnchangedSizeOps
- final def flatMap[B](f: (A) => IterableOnce[B]): List[B]
Creates a
List
by applyingf
to all elements of this collection and using the elements of every result.Creates a
List
by applyingf
to all elements of this collection and using the elements of every result.- Definition Classes
- ShorteningOps
- final def flatMapEither[B](f: (A) => IterableOnce[B]): Either[List[B], Several[B]]
Same as
flatMap
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.Same as
flatMap
but creates a collection of the same type and returns it in aRight
unless the number of remaining elements is too small in which case it escapes to aLeft[List]
.- Definition Classes
- ShorteningEitherOps
- 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
- def forall(p: (A) => Boolean): Boolean
Whether all elements satisfy the predicate
p
.Whether all elements satisfy the predicate
p
.- Definition Classes
- Several → UnchangedSizeOps
- 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
- Several → UnchangedSizeOps
- def get(index: Int): Option[A]
Gets the element at
index
if any.Gets the element at
index
if any.- Definition Classes
- UnchangedSizeOps
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val head: A
The first element.
The first element.
- Definition Classes
- Several → UnchangedSizeOps
- def isDefinedAt(index: Int): Boolean
Whether an element at
index
exists.Whether an element at
index
exists.- Definition Classes
- Several → UnchangedSizeOps
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator: Iterator[A]
Iterates over all elements of this collection.
Iterates over all elements of this collection.
- Definition Classes
- Several → UnchangedSizeOps → NonEmpty
- def map[B](f: (A) => B): Several[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
- Several → UnchangedSizeOps
- val more: Iterable[A]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newConditionalBuilder[B]: Conditional[B, Several, List]
- Attributes
- protected
- Definition Classes
- Several → ShorteningEitherOps
- def newEscapingBuilder[B]: Escaping[B, List]
- Attributes
- protected
- Definition Classes
- Several → ShorteningOps
- def newUnsafeBuilder[B]: Unsafe[B, Several]
- Attributes
- protected
- Definition Classes
- Several → UnchangedSizeOps
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def prepended[B >: A](elem: B): Several[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
- Several → LengtheningOps
- final def prependedAll[B >: A](prefix: NonEmpty[B]): Several[B]
- Definition Classes
- LengtheningOps
- final def prependedAll[B >: A](prefix: IterableOnce[B]): Several[B]
- Definition Classes
- LengtheningOps
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- 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
- final def reverse: Several[A]
- Definition Classes
- UnchangedSizeOps
- def size: Int
The number of elements in this collection.
The number of elements in this collection.
- Definition Classes
- Several → UnchangedSizeOps
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toList: List[A]
- Definition Classes
- UnchangedSizeOps
- def toOneOrMore: OneOrMore[A]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def zip[B](that: NonEmpty[B]): Several[(A, B)]
- Definition Classes
- UnchangedSizeOps
- final def zip[B](that: IterableOnce[B]): Several[(A, B)]
- Definition Classes
- UnchangedSizeOps
- final def zipWithIndex: Several[(A, Int)]
- Definition Classes
- UnchangedSizeOps
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Several[A] toStringFormat[Several[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 ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (Several[A], B)
- Implicit
- This member is added by an implicit conversion from Several[A] toArrowAssoc[Several[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.
Welcome to the Graph for Scala API reference. Some suggested entry points:
AnyGraph
immutable.Graph
and its inner nodesmutable.Graph
and its inner nodes.edges
package and its subpackageshyperedges
package and its subpackages.labeled edges
packagemultilabeled edges
packagelabeled hyperedges
packagemultilabeled hyperedges
packageordered labeled hyperedges
packageordered multilabeled hyperedges
objectgeneric
package.GraphTraversal
andTraverserInnerNode
.RandomGraph
.GraphGen
.