PageRenderTime 18ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/3.1.0/src/org/getopt/luke/decoders/OldNumberToolsDecoder.java

http://luke.googlecode.com/
Java | 21 lines | 15 code | 6 blank | 0 comment | 0 complexity | 11c015ca3dd0b6a7e599e36b681156c2 MD5 | raw file
 1package org.getopt.luke.decoders;
 2
 3import org.apache.lucene.document.NumberTools;
 4
 5public class OldNumberToolsDecoder implements Decoder {
 6
 7  @Override
 8  public String decodeTerm(String fieldName, Object value) throws Exception {
 9    return Long.toString(NumberTools.stringToLong(value.toString()));
10  }
11  
12  @Override
13  public String decodeStored(String fieldName, Object value) throws Exception {
14    return decodeTerm(fieldName, value);
15  }
16  
17  public String toString() {
18    return "(old NumberTools)";
19  }
20  
21}