DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | List of all members
Deveel.Data.Index.IIndexBlock< T > Interface Template Reference

A block contained in a BlockIndex. More...

Inheritance diagram for Deveel.Data.Index.IIndexBlock< T >:
Deveel.Data.Index.BlockIndex< T >.Block

Public Member Functions

bool CanContain (int count)
 
void Add (T value)
 Adss an int element to the block. More...
 
RemoveAt (int index)
 Removes the element at the given index from the block. More...
 
int IndexOf (T value)
 
int IndexOf (T value, int startIndex)
 
void Insert (T index, int value)
 Inserts an element to the block at the given index. More...
 
void MoveTo (IIndexBlock< T > destBlock, int destIndex, int count)
 
void CopyTo (IIndexBlock< T > destBlock)
 
int CopyTo (T[] array, int arrayIndex)
 
void Clear ()
 Clears the block of all elements. More...
 
int BinarySearch (object key, IIndexComparer< T > comparer)
 
int SearchFirst (object key, IIndexComparer< T > comparer)
 
int SearchLast (object key, IIndexComparer< T > comparer)
 
int SearchFirst (T value)
 
int SearchLast (T value)
 

Properties

IIndexBlock< T > Next [get, set]
 Gets or sets the next block in the hash. More...
 
IIndexBlock< T > Previous [get, set]
 Gets or sets the previous block in the hash. More...
 
bool HasChanged [get]
 
int Count [get]
 
bool IsFull [get]
 Gets a value indicating if the block is full. More...
 
bool IsEmpty [get]
 Gets a value indicating if the block is empty. More...
 
Top [get]
 Gets the element at the top of the block. More...
 
Bottom [get]
 Gets the element at the bottom of the block. More...
 
this[int index] [get, set]
 Gets or sets the element at the given index within the block. More...
 

Detailed Description

A block contained in a BlockIndex.

This exposes the contents of a block of the list.

An BlockIndexBase<T> is a single element of a block of integers that makes up some complete list of integers. A block encapsulates a set of integers making up the block, and a chain to the next and previous block in the hash.

Template Parameters
T

Definition at line 33 of file IIndexBlock_T.cs.

Member Function Documentation

void Deveel.Data.Index.IIndexBlock< T >.Add ( value)

Adss an int element to the block.

Parameters
valueThe value to insert into the block.

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

int Deveel.Data.Index.IIndexBlock< T >.BinarySearch ( object  key,
IIndexComparer< T >  comparer 
)

summary> Finds the first index in the block that equals the given key. /summary> param name="key">

param name="comparer">

Considers each element in the block as a reference to another structure, and the block sorted by these structures.

returns>

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

bool Deveel.Data.Index.IIndexBlock< T >.CanContain ( int  count)
void Deveel.Data.Index.IIndexBlock< T >.Clear ( )

Clears the block of all elements.

summary> Performs a binary search of the given value within the block. /summary> param name="key">

param name="comparer">

Considers each element in the block as a reference to another structure, and the block sorted by these structures.

returns>

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

void Deveel.Data.Index.IIndexBlock< T >.CopyTo ( IIndexBlock< T >  destBlock)

summary> Copies all the data from this block into the given array. /summary> param name="array">The destination array of the copy.

param name="arrayIndex">The index within the destination array from where to start copying data to.

returns> Returns the number of elements copied to the array.

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

int Deveel.Data.Index.IIndexBlock< T >.CopyTo ( T[]  array,
int  arrayIndex 
)
int Deveel.Data.Index.IIndexBlock< T >.IndexOf ( value)

summary> Performs an iterative search from the given position to the end of the list in the block. /summary> param name="value">

param name="startIndex">

returns> Returns the index of the value if found, otherwise it returns -1.

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

int Deveel.Data.Index.IIndexBlock< T >.IndexOf ( value,
int  startIndex 
)
void Deveel.Data.Index.IIndexBlock< T >.Insert ( index,
int  value 
)

Inserts an element to the block at the given index.

Parameters
index
value

summary> Moves a set of values from the end of this block and inserts it into the given block at the destination index specified. /summary> param name="destBlock">The block where to copy the elements from this block.

param name="destIndex">The index in the destination block from where to start copying element to.

param name="count">The number of element to copy.

Assumes the destination block has enough room to store the set. Assumes destBlock is the same type as this.

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

void Deveel.Data.Index.IIndexBlock< T >.MoveTo ( IIndexBlock< T >  destBlock,
int  destIndex,
int  count 
)

summary> Copies all the data from this block into the given destination block. /summary> param name="destBlock">

Assumes destBlock is the same class as this.

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

T Deveel.Data.Index.IIndexBlock< T >.RemoveAt ( int  index)

Removes the element at the given index from the block.

Parameters
indexThe index of the element to remove.
Returns
Returns the element removed from the block.

summary> Performs an iterative search through the values in the block. /summary> param name="value">

returns> Returns the index of the value if found, otherwise it returns -1.

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

int Deveel.Data.Index.IIndexBlock< T >.SearchFirst ( object  key,
IIndexComparer< T >  comparer 
)

summary> Finds the last index in the block that equals the given key. /summary> param name="key">

param name="comparer">

Considers each element in the block as a reference to another structure, and the block sorted by these structures.

returns>

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

int Deveel.Data.Index.IIndexBlock< T >.SearchFirst ( value)

summary> Assuming a sorted block, finds the last index in the block that equals the given value. /summary> param name="value">

returns>

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

int Deveel.Data.Index.IIndexBlock< T >.SearchLast ( object  key,
IIndexComparer< T >  comparer 
)

summary> Assuming a sorted block, finds the first index in the block that equals the given value. /summary> param name="value">

returns>

Implemented in Deveel.Data.Index.BlockIndex< T >.Block.

int Deveel.Data.Index.IIndexBlock< T >.SearchLast ( value)

Property Documentation

T Deveel.Data.Index.IIndexBlock< T >.Bottom
get

Gets the element at the bottom of the block.

Definition at line 76 of file IIndexBlock_T.cs.

int Deveel.Data.Index.IIndexBlock< T >.Count
get

Definition at line 56 of file IIndexBlock_T.cs.

bool Deveel.Data.Index.IIndexBlock< T >.HasChanged
get

summary> Returns the number of entries in this block. /summary>

Definition at line 51 of file IIndexBlock_T.cs.

bool Deveel.Data.Index.IIndexBlock< T >.IsEmpty
get

Gets a value indicating if the block is empty.

Definition at line 66 of file IIndexBlock_T.cs.

bool Deveel.Data.Index.IIndexBlock< T >.IsFull
get

Gets a value indicating if the block is full.

Definition at line 61 of file IIndexBlock_T.cs.

Gets or sets the next block in the hash.

Definition at line 37 of file IIndexBlock_T.cs.

IIndexBlock<T> Deveel.Data.Index.IIndexBlock< T >.Previous
getset

Gets or sets the previous block in the hash.

summary> Gets a value indicating if this store has been modified. /summary>

The purpose of this property is to determine if any updates need to be made to any persistant representation of this store.

Definition at line 42 of file IIndexBlock_T.cs.

T Deveel.Data.Index.IIndexBlock< T >.this[int index]
getset

Gets or sets the element at the given index within the block.

Parameters
indexThe zero-based index, inferior to Count, within the block at which the element is located.
Returns
Returns a int element at the given index within the block.

summary> Checks that the block has enough room to fill with the given number of integers. /summary> param name="count">The number of elements willing to allocate into the block.

returns> Returns true if the block can contain the number of entries specified, otherwise false.

Definition at line 86 of file IIndexBlock_T.cs.

Gets the element at the top of the block.

Definition at line 71 of file IIndexBlock_T.cs.


The documentation for this interface was generated from the following file: