Contiguous

oxygen.core.collection.Contiguous
See theContiguous companion object
final class Contiguous[+A]

The goal of this class is to be as close of a wrapper around Array as IArray is, without involving ClassTag. Array/IArray use ClassTag in order to create more efficiently sized arrays (bytes take up less space than longs, or objects). In order to do this, the Array/IArray types are LITTERED with ClassTags. It is the belief of this class that:

  1. This hindrance causes Array/IArray to be used less than they should.
  2. The value provided by space-saving in the case of primitives is MINIMAL. (Especially since it would usually push the programmer to use a type which is even less efficient).

Attributes

Companion
object
Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ++[A2 >: A](that: Contiguous[A2]): Contiguous[A2]
inline def apply(index: Int): A
def at(index: Int): A
def collect[B](f: PartialFunction[A, B]): Contiguous[B]
def collectFirst[B](f: PartialFunction[A, B]): Option[B]
def distinctBy[B](f: A => B): Contiguous[A]
override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Any
def filter(f: A => Boolean): Contiguous[A]
def filterNot(f: A => Boolean): Contiguous[A]
def flatMap[B](f: A => Contiguous[B]): Contiguous[B]
def flatMapIterable[B](f: A => IterableOnce[B]): Contiguous[B]
def flatten[B](using ev: A <:< Contiguous[B]): Contiguous[B]
def flattenIterable[B](using ev: A <:< IterableOnce[B]): Contiguous[B]
inline def foldLeft[B](z: B)(op: (B, A) => B): B
inline def foldRight[B](z: B)(op: (A, B) => B): B
inline def foreach[U](f: A => U): Unit
inline def foreachFrom[U](i: Int)(f: A => U): Unit
inline def get(index: Int): Option[A]
inline def isEmpty: Boolean
inline def iterator: Iterator[A]
def map[B](f: A => B): Contiguous[B]
inline def max[B >: A : Ordering]: A
inline def maxBy[B : Ordering](f: A => B): A
inline def maxByOption[B : Ordering](f: A => B): Option[A]
inline def maxOption[B >: A : Ordering]: Option[A]
inline def min[B >: A : Ordering]: A
inline def minBy[B : Ordering](f: A => B): A
inline def minByOption[B : Ordering](f: A => B): Option[A]
inline def minOption[B >: A : Ordering]: Option[A]
inline def mkString: String
inline def mkString(sep: String): String
inline def mkString(start: String, sep: String, end: String): String
inline def nonEmpty: Boolean
def partition(f: A => Boolean): (Contiguous[A], Contiguous[A])
def partitionMap[A1, A2](f: A => Either[A1, A2]): (Contiguous[A1], Contiguous[A2])
def sortBy[B : Ordering](f: A => B): Contiguous[A]
def sorted[B >: A : Ordering]: Contiguous[A]
inline def toArray: Array[A]
inline def toIArray: IArray[A]
inline def toIndexedSeq: IndexedSeq[A]
inline def toList: List[A]
inline def toMap[K, V](implicit ev: A <:< (K, V)): Map[K, V]
inline def toSeq: Seq[A]
inline def toSet[B >: A]: Set[B]
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def toTypedArray[B >: A](using classTag: ClassTag[B]): Array[B]

Gets an Array out of this Contiguous, ensuring that the resulting array has correctly sized elements, instead of using Any for all types.

Gets an Array out of this Contiguous, ensuring that the resulting array has correctly sized elements, instead of using Any for all types.

Attributes

def toTypedIArrayArray[B >: A](using classTag: ClassTag[B]): IArray[B]

Gets an Array out of this Contiguous, ensuring that the resulting array has correctly sized elements, instead of using Any for all types.

Gets an Array out of this Contiguous, ensuring that the resulting array has correctly sized elements, instead of using Any for all types.

Attributes

inline def toVector: Vector[A]
def zipUsing[B, C](that: Contiguous[B])(leftOnly: A => C, rightOnly: B => C, both: (A, B) => C): Contiguous[C]

Concrete fields

val length: Int
val lift: Int => Option[A]