com.github.arturopala.bufferandslice

Members list

Type members

Classlikes

final class ArrayBuffer[T](initialArray: Array[T]) extends ArrayBufferLike[T]

Growable, mutable array of values.

Growable, mutable array of values.

Type parameters

T

type of the underlying array items

Attributes

Companion
object
Supertypes
trait ArrayBufferLike[T]
trait Buffer[T]
trait Int => T
class Object
trait Matchable
class Any
Show all
object ArrayBuffer

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
trait ArrayBufferLike[T] extends Buffer[T]

Common buffer functions impl for array-backend buffers.

Common buffer functions impl for array-backend buffers.

Attributes

Supertypes
trait Buffer[T]
trait Int => T
class Object
trait Matchable
class Any
Known subtypes
class ArrayBuffer[T]
class ByteBuffer
class IntBuffer
object ArrayOps

Array modifications helper.

Array modifications helper.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ArrayOps.type
final class ArraySlice[T] extends ArraySliceLike[T]

Lazy, immutable slice of an underlying array.

Lazy, immutable slice of an underlying array.

Type parameters

T

type of the array's items

Attributes

Note

Truly immutable only if an underlying array kept private or if detached.

Companion
object
Supertypes
trait ArraySliceLike[T]
trait Slice[T]
trait Int => T
class Object
trait Matchable
class Any
Show all
object ArraySlice

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ArraySlice.type
trait ArraySliceLike[T] extends Slice[T]

Common functions of an array-backed Slice.

Common functions of an array-backed Slice.

Type parameters

T

type of the array's items

Attributes

Note

Truly immutable only if an underlying array kept private, or if detached.

Supertypes
trait Slice[T]
trait Int => T
class Object
trait Matchable
class Any
Known subtypes
class ArraySlice[T]
class ByteSlice
class IntSlice
trait Buffer[T] extends Int => T

Mutable indexed buffer abstraction. All modifications happens in-place.

Mutable indexed buffer abstraction. All modifications happens in-place.

In addition, the Buffer API offers both Stack- and List-like interfaces. For the purpose of the List-like processing, the head is a top element in the buffer.

Attributes

Companion
object
Supertypes
trait Int => T
class Object
trait Matchable
class Any
Known subtypes
trait ArrayBufferLike[T]
class ArrayBuffer[T]
class ByteBuffer
class IntBuffer
object Buffer

Buffer factory.

Buffer factory.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Buffer.type
final class ByteBuffer(initialSize: Int) extends ArrayBufferLike[Byte]

Growable, mutable array of bytes.

Growable, mutable array of bytes.

Attributes

Companion
object
Supertypes
trait ArrayBufferLike[Byte]
trait Buffer[Byte]
trait Int => Byte
class Object
trait Matchable
class Any
Show all
object ByteBuffer

ByteBuffer factory.

ByteBuffer factory.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ByteBuffer.type
final class ByteSlice extends ArraySliceLike[Byte]

Lazy, specialized slice of the array of bytes.

Lazy, specialized slice of the array of bytes.

Attributes

Note

Truly immutable only if an underlying array kept private, or if detached.

Companion
object
Supertypes
trait ArraySliceLike[Byte]
trait Slice[Byte]
trait Int => Byte
class Object
trait Matchable
class Any
Show all
object ByteSlice

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ByteSlice.type
final class DeferredArrayBuffer[T](initialLength: Int) extends ArrayBufferLike[T]

Growable, mutable array of values with deferred initialization.

Growable, mutable array of values with deferred initialization.

Type parameters

T

type of the underlying array items

Value parameters

initialLength

initial length of the buffer

Attributes

Note

This is to avoid ClassTag parameters as much as possible, but comes with a price of a few rough corners. Especially, if your type parameter is non-primitive do not try to call asArray and assign result to variable, as it will raise ClassCastException, instead pass the array as a parameter or call methods on it.

Companion
object
Supertypes
trait ArrayBufferLike[T]
trait Buffer[T]
trait Int => T
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
object IndexTracker

Set of functions to update buffers or sequences of indexes values in order to match corresponding buffer operations. Useful to track values and structures movement during buffer modifications.

Set of functions to update buffers or sequences of indexes values in order to match corresponding buffer operations. Useful to track values and structures movement during buffer modifications.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final class IntBuffer(initialSize: Int) extends ArrayBufferLike[Int]

Growable, mutable array of integers.

Growable, mutable array of integers.

Attributes

Companion
object
Supertypes
trait ArrayBufferLike[Int]
trait Buffer[Int]
trait Int => Int
class Object
trait Matchable
class Any
Show all
object IntBuffer

IntBuffer factory.

IntBuffer factory.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
IntBuffer.type
final class IntSlice extends ArraySliceLike[Int]

Lazy, specialized slice of the array of integers.

Lazy, specialized slice of the array of integers.

Attributes

Note

Truly immutable only if an underlying array kept private, or if detached.

Companion
object
Supertypes
trait ArraySliceLike[Int]
trait Slice[Int]
trait Int => Int
class Object
trait Matchable
class Any
Show all
object IntSlice

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
IntSlice.type
abstract class LazyMapArraySlice[T] extends Slice[T]

Lazily mapped slice of an underlying array.

Lazily mapped slice of an underlying array.

Type parameters

T

type of the array's items

Attributes

Note

Truly immutable only if an underlying array kept private, or if detached.

Companion
object
Supertypes
trait Slice[T]
trait Int => T
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class RangeMapSlice[T] extends Slice[T]

Lazily mapped slice of an index range.

Lazily mapped slice of an index range.

Attributes

Companion
object
Supertypes
trait Slice[T]
trait Int => T
class Object
trait Matchable
class Any
object RangeMapSlice

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
trait Slice[T] extends Int => T

Lazy and immutable slice of a sequence of values.

Lazy and immutable slice of a sequence of values.

Type parameters

T

type of the items of the sequence.

Attributes

Note

As the slice usually wraps over a mutable structure, like an array or a java buffer, and it DOES NOT make an instant copy, any changes to the underlying source will directly affect the slice output unless detached. Detach is a one-time copy operation, and detached property is preserved across all operations returning a Slice.

Companion
object
Supertypes
trait Int => T
class Object
trait Matchable
class Any
Known subtypes
trait ArraySliceLike[T]
class ArraySlice[T]
class ByteSlice
class IntSlice
class RangeMapSlice[T]
Show all
object Slice

Slice companion object. Host factory methods.

Slice companion object. Host factory methods.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Slice.type