DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
IIndex_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;
18 using System.Collections.Generic;
19 
20 namespace Deveel.Data.Index {
26  public interface IIndex<T> : IEnumerable<T> {
34  bool IsReadOnly { get; set; }
35 
39  int Count { get; }
40 
52  T this[int index] { get; }
53 
54 
59  void Add(T value);
60 
72  void Insert(int index, T value);
73 
85  T RemoveAt(int index);
86 
102  bool Contains(T value);
103 
108  void InsertSort(T value);
109 
119  bool UniqueInsertSort(T value);
120 
133  bool RemoveSort(T value);
134 
149  bool Contains(object key, IIndexComparer<T> comparer);
150 
165  void InsertSort(object key, T value, IIndexComparer<T> comparer);
166 
178  T RemoveSort(object key, T value, IIndexComparer<T> comparer);
179 
190  int SearchLast(object key, IIndexComparer<T> comparer);
191 
202  int SearchFirst(object key, IIndexComparer<T> comparer);
203 
212  new IIndexEnumerator<T> GetEnumerator();
213 
226  IIndexEnumerator<T> GetEnumerator(int startOffset, int endOffset);
227  }
228 }
Enumerates the elements of an index.
A comparer that is used within IIndex to compares two values which are indices to data that is bei...
An interface for querying and accessing an index of primitive integers.
Definition: IIndex.cs:37