Build a Buffer instance from the provided values.
Allocate an empty Buffer.
Provide an Eq[Buffer[A]] instance.
Provide an Eq[Buffer[A]] instance.
This method uses the given Eq[A] to compare each element pairwise. Buffers are required to be the same length.
Fill a length-n Buffer with a constant value.
Fill a length-n Buffer with a constant value.
If A is a reference type, all the elements in the Buffer will point to the same 'a' instance. If it is known to be a value type (e.g. Int) then all the values will be primitives.
Build a Buffer from the provided array.
Build a Buffer from the provided array.
Unlike 'unsafe' this method clones the given array, to prevent possible corruption later.
Build a Buffer from the provided iterable object.
Provides a Monoid[Buffer[A]] instance.
Provides a Monoid[Buffer[A]] instance.
The identity value is an empty buffer, and the ++ operator is used to concatenate two buffers without modifying their contents.
Allocate an empty Buffer, capable of holding n items without resizing itself.
Allocate an empty Buffer, capable of holding n items without resizing itself.
This method is useful if you know you'll be adding a large number of elements in advance and you want to save a few resizes.
Provide an Order[Buffer[A]] instance.
Provide an Order[Buffer[A]] instance.
The empty buffer is considered "less-than" any non-empty buffer, and non-empty buffers are compared lexicographically. Elemens are compared using the given Order[A].
Alternative Monoid[Buffer[A]] which combines buffers in a pairwise fashion.
Wrap an array instance directly in a Buffer.
Wrap an array instance directly in a Buffer.
This method is named 'unsafe' because the underlying array could potentially be modified somewhere else, changing or corrupting the Buffer. You should only use this method when you know that the array will not be stored or modified externally.