DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
IIndexBlock_T.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System.Collections.Generic;
18 
19 namespace Deveel.Data.Index {
33  public interface IIndexBlock<T> : IEnumerable<T> {
37  IIndexBlock<T> Next { get; set; }
38 
42  IIndexBlock<T> Previous { get; set; }
43 
51  bool HasChanged { get; }
52 
56  int Count { get; }
57 
61  bool IsFull { get; }
62 
66  bool IsEmpty { get; }
67 
71  T Top { get; }
72 
76  T Bottom { get; }
77 
86  T this[int index] { get; set; }
87 
98  bool CanContain(int count);
99 
104  void Add(T value);
105 
113  T RemoveAt(int index);
114 
122  int IndexOf(T value);
123 
133  int IndexOf(T value, int startIndex);
134 
140  void Insert(T index, int value);
141 
154  void MoveTo(IIndexBlock<T> destBlock, int destIndex, int count);
155 
163  void CopyTo(IIndexBlock<T> destBlock);
164 
174  int CopyTo(T[] array, int arrayIndex);
175 
179  void Clear();
180 
191  int BinarySearch(object key, IIndexComparer<T> comparer);
192 
203  int SearchFirst(object key, IIndexComparer<T> comparer);
204 
215  int SearchLast(object key, IIndexComparer<T> comparer);
216 
223  int SearchFirst(T value);
224 
231  int SearchLast(T value);
232  }
233 }
A comparer that is used within IIndex to compares two values which are indices to data that is bei...
A block contained in a BlockIndex.