Examples of apply()


Examples of graphplan.domain.jason.PropositionImpl.apply()

            System.err.println("Big mess!");
          }
         
          for(Proposition proposition : copy.getPreconds()) {
            PropositionImpl realProp = (PropositionImpl) proposition;
            realProp.apply(unifier);
            addInstance = preconds.contains(proposition);
           
            if(proposition.negated() && !addInstance) {
              /*Closed World Assumption*/
              if(initialState != null && initialState.isPropositionLevel()){
View Full Code Here

Examples of greed.conf.parser.IParser.apply()

                Class<?> fieldType = field.getType();
                hasSet.add(field.getName());
                if (fieldType.isPrimitive() || String.class.equals(fieldType) || fieldType.isEnum()) {
                    setter.invoke(configObject,
                            parser != null ? parser.apply(rawConf.getAnyRef(field.getName())) : parseAndCheck(path + "." + field.getName(), rawConf.getAnyRef(field.getName()), fieldType));
                }
                else if (fieldType.isArray()) {
                    Class<?> elementType = fieldType.getComponentType();
                    List<?> rawValues = rawConf.getAnyRefList(field.getName());
                    Object values = Array.newInstance(elementType, rawValues.size());
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.block.Block.apply()

                                new ExecutionFrame((CompoundBlock) currentBlock, currentFrame);
                        kernelState.addLastExecutionFrame(childFrame);
                        currentFrame = childFrame;

                        // Apply block changes
                        currentBlock.apply(record, currentFrame.getVariables());
                       
                        // Startup changing record
                        if (currentFrame.isRecordchangehandler()) {
                            try {
                                record = ((RecordChangeHandler) currentFrame.getControl()).changeRecord(record);
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.block.CollapseWhitespace.apply()

        r.add(new Field("test"));
        r.get("test").setValue("Nagy  Hajnalka");

        CollapseWhitespace cwsp = new CollapseWhitespace();
        cwsp.setApplyTo(Arrays.asList(new String[] { "test" }));
        cwsp.apply(r, scope);

        Assert.assertEquals("Nagy Hajnalka", r.get("test").getValue());
    }

    @Test
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.block.Copy.apply()

        r.add(new Field("c", "ccc"));
        r.add(new Field("d", "ddd"));
       
      
        // Perform copy
        copy.apply(r, new VariableSpace());
       
        assertEquals("ddd", r.get("a").getValue());
        assertEquals("ddd", r.get("b").getValue());
        assertEquals("ccc", r.get("c").getValue());       
    }
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.block.Cut.apply()

        r.add(new Field("c", "cccc"));
        r.add(new Field("d", "ddd"));
       
      
        // Perform copy
        cut.apply(r, new VariableSpace());
       
        Assert.assertEquals("aaaa", r.get("a").getValue());
        Assert.assertEquals("bbbb", r.get("b").getValue());
        Assert.assertEquals("cccc", r.get("c").getValue());       
        Assert.assertEquals("ddd", r.get("d").getValue());       
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.block.SetCharacterCase.apply()

        SetCharacterCase scc = new SetCharacterCase();
        scc.setCase(CharacterCase.Lowercase);
        scc.setCharacters(CharacterTarget.ALL);
        scc.setApplyTo(Arrays.asList(new String[] { "test" }));
       
        scc.apply(r, scope);
       
        scc.setCase(CharacterCase.Uppercase);
        scc.setCharacters(CharacterTarget.TOKEN_INITIALS_NON_ALNUM);
        scc.setApplyTo(Arrays.asList(new String[] { "test" }));
       
View Full Code Here

Examples of io.druid.query.extraction.DimExtractionFn.apply()

    DimExtractionFn dimExtractionFn = new SearchQuerySpecDimExtractionFn(spec);
    List<String> expected = Arrays.asList("Kyoto", "Tokyo", "Toyokawa", "Yorktown");
    Set<String> extracted = Sets.newHashSet();

    for (String str : testStrings) {
      String res = dimExtractionFn.apply(str);
      if (res != null) {
        extracted.add(res);
      }
    }
View Full Code Here

Examples of io.druid.query.extraction.JavascriptDimExtractionFn.apply()

  {
    String function = "function(str) { return str.substring(0,3); }";
    DimExtractionFn dimExtractionFn = new JavascriptDimExtractionFn(function);

    for (String str : testStrings) {
      String res = dimExtractionFn.apply(str);
      Assert.assertEquals(str.substring(0, 3), res);
    }
  }

  @Test
View Full Code Here

Examples of io.druid.query.extraction.PartialDimExtractionFn.apply()

    DimExtractionFn dimExtractionFn = new PartialDimExtractionFn(regex);
    List<String> expected = Arrays.asList("Quito", "Tokyo", "Stockholm", "Pretoria", "Wellington");
    Set<String> extracted = Sets.newHashSet();

    for (String str : testStrings) {
      String res = dimExtractionFn.apply(str);
      if (res != null) {
        extracted.add(res);
      }
    }
View Full Code Here
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.