View Javadoc

1   package net.obsearch.storage;
2   import net.obsearch.storage.Tuple;
3   import java.nio.ByteBuffer;
4   /*
5    OBSearch: a distributed similarity search engine This project is to
6    similarity search what 'bit-torrent' is to downloads. 
7    Copyright (C) 2008 Arnoldo Jose Muller Molina
8   
9    This program is free software: you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation, either version 3 of the License, or
12   (at your option) any later version.
13  
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18  
19   You should have received a copy of the GNU General Public License
20   along with this program.  If not, see <http://www.gnu.org/licenses/>.
21   */
22  
23  /**
24   * A tuple returned by a range operation of an OBStore
25   * implementation. This object holds the key and the value of objects
26   * found within a range search. The key is a double, and the value is
27   * always an array of bytes.
28   * @author Arnoldo Jose Muller Molina
29   */
30  
31  public final class TupleDouble extends Tuple{
32  
33      private double key;
34      
35      
36  
37      public TupleDouble(double key, byte[] value) {
38  				super(value);
39          this.key = key;
40      }
41  
42      /**
43       * 
44       * @return The key.
45       */
46      public double getKey() {
47          return key;
48      }
49  
50      
51  }
52