public Object get(CharSequence key) {if (fst == null) {return null;}Arc<Long> arc = new Arc<>();Long result = null;try {result = lookupPrefix(new BytesRef(key), arc);} catch (IOException bogus) { throw new RuntimeException(bogus); }if (result == null || !arc.isFinal()) {return null;} else {return Integer.valueOf(decodeWeight(result + arc.nextFinalOutput()));}}
public virtual object Get(string key){if (fst == null){return null;}FST.Arc<long?> arc = new FST.Arc<long?>();long? result = null;try{result = LookupPrefix(new BytesRef(key), arc);}catch (IOException bogus){throw new Exception(bogus.ToString(), bogus);}if (result == null || !arc.IsFinal){return null;}else{return DecodeWeight(result.GetValueOrDefault() + arc.NextFinalOutput.GetValueOrDefault());}}