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.
- Alphabetic
- By Inheritance
- OneOrMore
- 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]): OneOrMore[B]
Alias for
concat
Alias for
concat
- Definition Classes
- LengtheningOps
- final def ++[B >: A](that: IterableOnce[B]): OneOrMore[B]
Alias for
concat
Alias for
concat
- Definition Classes
- LengtheningOps
- final def ++:[B >: A](prefix: NonEmpty[B]): OneOrMore[B]
Alias for
prependedAll
Alias for
prependedAll
- Definition Classes
- LengtheningOps
- final def ++:[B >: A](prefix: IterableOnce[B]): OneOrMore[B]
Alias for
prependedAll
Alias for
prependedAll
- Definition Classes
- LengtheningOps
- final def +:[B >: A](elem: B): OneOrMore[B]
Alias for
prepended
Alias for
prepended
- Definition Classes
- LengtheningOps
- def ->[B](y: B): (OneOrMore[A], B)
- final def :+[B >: A](elem: B): OneOrMore[B]
Alias for
appended
Alias for
appended
- Definition Classes
- LengtheningOps
- final def :++[B >: A](suffix: NonEmpty[B]): OneOrMore[B]
Alias for
appendedAll
Alias for
appendedAll
- Definition Classes
- LengtheningOps
- final def :++[B >: A](suffix: IterableOnce[B]): OneOrMore[B]
Alias for
appendedAll
Alias for
appendedAll
- Definition Classes
- LengtheningOps
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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
- OneOrMore → LengtheningOps
- final def appendedAll[B >: A](suffix: NonEmpty[B]): OneOrMore[B]
- Definition Classes
- LengtheningOps
- final def appendedAll[B >: A](suffix: IterableOnce[B]): OneOrMore[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
- OneOrMore → 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], OneOrMore[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]): 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
- 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: (OneOrMore[A]) => Boolean, msg: => Any): OneOrMore[A]
- def ensuring(cond: (OneOrMore[A]) => Boolean): OneOrMore[A]
- def ensuring(cond: Boolean, msg: => Any): OneOrMore[A]
- def ensuring(cond: Boolean): OneOrMore[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], OneOrMore[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], OneOrMore[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
- OneOrMore → 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], OneOrMore[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
- OneOrMore → 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
- OneOrMore → 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
- OneOrMore → UnchangedSizeOps
- def isDefinedAt(index: Int): Boolean
Whether an element at
index
exists.Whether an element at
index
exists.- Definition Classes
- OneOrMore → 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
- OneOrMore → UnchangedSizeOps → NonEmpty
- 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
- OneOrMore → UnchangedSizeOps
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newConditionalBuilder[B]: Conditional[B, OneOrMore, List]
- Attributes
- protected
- Definition Classes
- OneOrMore → ShorteningEitherOps
- def newEscapingBuilder[B]: Escaping[B, List]
- Attributes
- protected
- Definition Classes
- OneOrMore → ShorteningOps
- def newUnsafeBuilder[B]: Unsafe[B, OneOrMore]
- Attributes
- protected
- Definition Classes
- OneOrMore → 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): 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
- OneOrMore → LengtheningOps
- final def prependedAll[B >: A](prefix: NonEmpty[B]): OneOrMore[B]
- Definition Classes
- LengtheningOps
- final def prependedAll[B >: A](prefix: IterableOnce[B]): OneOrMore[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: OneOrMore[A]
- Definition Classes
- UnchangedSizeOps
- def size: Int
The number of elements in this collection.
The number of elements in this collection.
- Definition Classes
- OneOrMore → UnchangedSizeOps
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val tail: Iterable[A]
- final def toList: List[A]
- Definition Classes
- UnchangedSizeOps
- 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]): OneOrMore[(A, B)]
- Definition Classes
- UnchangedSizeOps
- final def zip[B](that: IterableOnce[B]): OneOrMore[(A, B)]
- Definition Classes
- UnchangedSizeOps
- final def zipWithIndex: OneOrMore[(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 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 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): (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.
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
.