Examples of lookup()


Examples of org.xtreemfs.babudb.index.LSMTree.lookup()

   
    public byte[] lookup(int indexId, byte[] key) throws BabuDBException {
        LSMTree tree = database.getIndex(indexId);
        if (tree == null)
            throw new BabuDBException(BabuDBException.ErrorCode.NO_SUCH_INDEX, "index " + indexId + " does not exist");
        return tree.lookup(key);
    }
   
    public byte[] lookup(int indexId, byte[] key, int snapId) throws BabuDBException {
        LSMTree tree = database.getIndex(indexId);
        if (tree == null)

Examples of org.xtreemfs.babudb.index.overlay.MultiOverlayBufferTree.lookup()

        for (int i = 0; i < numElements; i++) {
           
            String keyString = Integer.toHexString(i);
            byte[] key = keyString.getBytes();
           
            assertEquals(tree.lookup(key), map1.get(keyString));
        }
       
        // create a new overlay
        int snap1 = tree.newOverlay();
        final SortedMap<String, byte[]> map2 = new TreeMap<String, byte[]>(map1);

Examples of org.xtreemfs.babudb.index.reader.DiskIndex.lookup()

       
        DiskIndex index = indexMap.get(indexId);
        if (index == null)
            throw new BabuDBException(ErrorCode.NO_SUCH_INDEX, "index " + indexId + " does not exist");
       
        return index.lookup(key);
    }
   
    @Override
    public ResultSet<byte[], byte[]> directPrefixLookup(int indexId, byte[] key, boolean ascending) throws BabuDBException {
       

Examples of org.yaac.server.egql.processor.ProcessData.ProcessDataRecord.lookup()

public class EvaluationWithContextTest {

  @Test
  public void test1() throws Exception {   
    ProcessDataRecord record = mock(ProcessDataRecord.class);
    when(record.lookup("a")).thenReturn(new EvaluationResult(null, null, null, new BigDecimal("1.5")));
   
    assertEquals(new EvaluationResult(new BigDecimal("5.5")), evaluate("4 + a", record));
  }
 
  @Test

Examples of org.yinwang.yin.Scope.lookup()

                                    + " actual: " + args.positional.size());
                }

                for (int i = 0; i < args.positional.size(); i++) {
                    Value value = args.positional.get(i).typecheck(s);
                    Value expected = funScope.lookup(params.get(i).id);
                    if (!Type.subtype(value, expected, false)) {
                        Util.abort(args.positional.get(i), "type error. expected: " + expected + ", actual: " + value);
                    }
                    funScope.putValue(params.get(i).id, value);
                }

Examples of pl.net.bluesoft.rnd.processtool.model.dict.ProcessDictionary.lookup()

        }
        if (dictionary == null) {
            dictionary = fetchDefaultDictionary();
        }
        if (dictionary != null && dictionary.containsKey(key)) {
            ProcessDictionaryItem<String, String> item = dictionary.lookup(key);
            ProcessDictionaryItemValue<String> value = item.getValueForCurrentDate();
            if (value != null) {
                return value.getValue();
            }
        }

Examples of remote.service.motedata.client.Table.lookup()

  {
    try
    {
      Table moteInfoTable = MoteDataWrapper.getMoteTable();
      int colIndex = moteInfoTable.getHeader().indexOf("mote_id");
      TableRow moteInfoRow = moteInfoTable.lookup(colIndex,new Long(mote.getId()));
      MoteControlRow moteControl = new MoteControlRow(mote,true,moteInfoRow,this);
    /*  LedsListenerWrapper ledsobs = new LedsListenerWrapper(this,mote);
      moteControl.getMoteLeds().addListener(ledsobs);*/
      this.moteControlMap.put(mote,moteControl);
      mote.getStatus().addChangeListener(this);
 

Examples of utils.Dictionary.lookup()

        { 'A', 'p' }, { 'E', 'l' } , { 'B', 'c' }, { 'R', 'r' }, { 'T', 'y' },
        { 'D', 'd' }, { 'Z', 'u' }, { 'K', 'v' }, { 'J', 'b' },
        { 'I', 'k' }, { 'G', 'w' }});
    PrintWriter pw = new PrintWriter(new FileOutputStream("output"));
    for (int l = 0; l < sb.length(); l++) {
      pw.write(dict.lookup(sb.charAt(l)));
    }
    pw.close();

  }

Examples of utils.OneOneDictionary.lookup()

        { 'A', 'p' }, { 'E', 'l' } , { 'B', 'c' }, { 'R', 'r' }, { 'T', 'y' },
        { 'D', 'd' }, { 'Z', 'u' }, { 'K', 'v' }, { 'J', 'b' },
        { 'I', 'k' }, { 'G', 'w' }});
    PrintWriter pw = new PrintWriter(new FileOutputStream("output"));
    for (int l = 0; l < sb.length(); l++) {
      pw.write(dict.lookup(sb.charAt(l)));
    }
    pw.close();

  }

Examples of wyvern.tools.types.Environment.lookup()

    final Environment savedNtEnv2 = ntEnv;
    res.getGrammars().stream().map(res::getGrammar)
        .flatMap(grm->grm.getElementsOfType(CopperElementType.PRODUCTION).stream().map(grm::getGrammarElement).<Production>map(el->(Production)el))
        .<Pair<Production, List<NameBinding>>>map(prod->new Pair<Production, List<NameBinding>>(prod, CopperTSL.<Type,String,Optional<NameBinding>>
            zip(prod.getRhs().stream().map(cer->savedNtEnv2.lookup(cer.getName().toString()).getType()), prod.getRhsVarNames().stream(),
            (type, name) -> (name == null)?Optional.empty():Optional.of(new NameBindingImpl(name, type)))
            .<NameBinding>flatMap(o -> o.isPresent() ? Stream.of(o.get()) : Stream.empty())
            .collect(Collectors.<NameBinding>toList()))
        ).forEach(updateCode(toGen,ntEnv,methNum, res.getClassName()));
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.