DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
SearchResult.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2014 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 using System;
17 using System.Collections;
18 
19 namespace Deveel.Data.Text {
20  public sealed class SearchResult {
21  #region .ctor
22  public SearchResult(string query, int capacity) {
23  this.query = query;
24  results = new Hashtable(capacity);
25  }
26  #endregion
27 
28  #region Fields
29  private string query;
30  private Hashtable results;
31  #endregion
32 
33  #region Properties
34  public string Query {
35  get { return query; }
36  }
37  #endregion
38 
39  #region Public Methods
40  public void AddScore(int rowIndex, double score) {
41  results.Add(rowIndex, score);
42  }
43 
44  public double GetScore(int rowIndex) {
45  return (double)results[rowIndex];
46  }
47  #endregion
48  }
49 }
double GetScore(int rowIndex)
Definition: SearchResult.cs:44
void AddScore(int rowIndex, double score)
Definition: SearchResult.cs:40
SearchResult(string query, int capacity)
Definition: SearchResult.cs:22