Package io.github.alexandrepiveteau.echo.core.buffer
Types
An interface representing a mutable gap buffer, containing a sequence of Byte, which is optimized for chunk insertions and removals.
An interface representing a mutable gap buffer, containing a sequence of Char, which is optimized for chunk insertions and removals.
An interface representing a mutable gap buffer, containing a sequence of EventIdentifier, which is optimized for chunk insertions and removals.
An interface representing a mutable gap buffer, containing a sequence of T, which is optimized for chunk insertions and removals.
An interface representing a mutable gap buffer, containing a sequence of Int, which is optimized for chunk insertions and removals.
Functions
Searches this MutableEventIdentifierGapBuffer for the provided element using the binary search algorithm. The array is expected to be sorted, otherwise the result is undefined.
Searches this MutableIntGapBuffer for the provided element using the binary search algorithm. The array is expected to be sorted, otherwise the result is undefined.
Searches this MutableEventIdentifierGapBuffer for the provided element using the binary search algorithm. The array is expected to be sorted by site identifiers, otherwise the result is undefined.
Copies the given range from the MutableByteGapBuffer.
Copies the given range from the MutableCharGapBuffer.
Copies the given range from the MutableEventIdentifierGapBuffer.
Copies the given range from the MutableGapBuffer.
Copies the given range from the MutableIntGapBuffer.
Returns the insertion index for the given EventIdentifier. The insertion index can be seen as the index at which the cursor should be moved when inserting an event with the given sequence number and site identifier that would preserve the sorted behavior of the buffer.
Returns the insertion index for the given Int. The insertion index can be seen as the index at which the cursor should be moved when inserting an event with the given sequence number and site identifier that would preserve the sorted behavior of the buffer.
Creates a MutableByteGapBuffer with a given size, where each cell is init at zero.
Creates a MutableByteGapBuffer with a given size, where each item is init.
Creates an empty MutableByteGapBuffer.
Creates a MutableCharGapBuffer with a given size, where each cell is init at zero.
Creates a MutableCharGapBuffer with a given size, where each item is init.
Creates an empty MutableCharGapBuffer.
Creates a MutableEventIdentifierGapBuffer with a given size, where each cell is init at zero.
Creates a MutableEventIdentifierGapBuffer with a given size, where each item is init.
Creates an empty MutableEventIdentifierGapBuffer.
Creates a MutableGapBuffer with a given size, where each item is init.
Creates an empty MutableGapBuffer.
Creates a MutableIntGapBuffer with a given size, where each cell is init at zero.
Creates a MutableIntGapBuffer with a given size, where each item is init.
Creates an empty MutableIntGapBuffer.
Pushes the given Byte at the current gap cursor.
Pushes the given Char at the current gap cursor.
Pushes the given EventIdentifier at the current gap cursor.
Pushes the given T at the current gap cursor.
Pushes the given Int at the current gap cursor.
Pushes an array of Byte at the current gap cursor.
Pushes an array of Char at the current gap cursor.
Pushes an array of EventIdentifier at the current gap cursor.
Pushes an array of T at the current gap cursor.
Pushes an array of Int at the current gap cursor.
Copies the contents of this MutableByteGapBuffer into a new ByteArray.
Copies the contents of this MutableCharGapBuffer into a new CharArray.
Copies the contents of this MutableEventIdentifierGapBuffer into a new EventIdentifierArray.
Copies the contents of this MutableIntGapBuffer into a new IntArray.
Copies the contents of this EventIdentifierArray into a new MutableEventIdentifierGapBuffer.
Copies the contents of this Array into a new MutableGapBuffer.
Copies the contents of this ByteArray into a new MutableByteGapBuffer.
Copies the contents of this CharArray into a new MutableCharGapBuffer.
Copies the contents of this IntArray into a new MutableIntGapBuffer.
Copies the contents of this MutableByteGapBuffer into a new Array of Byte.
Copies the contents of this MutableCharGapBuffer into a new Array of Char.
Copies the contents of this MutableEventIdentifierGapBuffer into a new Array of EventIdentifier.
Copies the contents of this MutableGapBuffer into a new ByteArray.
Copies the contents of this MutableIntGapBuffer into a new Array of Int.