Examples of replace()


Examples of net.sourceforge.temply.base.VarExpressionFinder.replace()

        String text = template.getText();

        VarExpressionFinder finder = new VarExpressionFinder(_repository);
        for (VarExpression varExp : finder.find(text)) {
            text = finder.replace(text, varExp, resolver.resolve(varExp.toString()));
        }
       
        Collection<VarExpression> unresolvedExpressions = finder.find(text);
        if (!unresolvedExpressions.isEmpty()) {
            StringBuffer sb = new StringBuffer("Unresolved expressions:\n");
View Full Code Here

Examples of net.spy.memcached.MemcachedClient.replace()

    if (isCalledAs("set")){
      client.set(key, exp, o);
    } else if (isCalledAs("add")){
      client.add(key, exp, o);
    } else if (isCalledAs("replace")){
      client.replace(key, exp, o);
    }
       
        return Sequence.EMPTY_SEQUENCE;
   
  }
View Full Code Here

Examples of net.timewalker.ffmq3.storage.message.MessageStore.replace()

              // Retrieve message content
               AbstractMessage msg = store.retrieve(handle);
              
               // Update redelivered flag both in memory and message store
               msg.setJMSRedelivered(true);
               handle = store.replace(handle, msg);
              
              if (redeliveryDelay > 0)
              {
                  // Keep the message locked so it cannot be re-consumed immediately                 
                // and schedule the message unlock afetr redeliveryDelay milliseconds
View Full Code Here

Examples of net.yacy.kelondro.index.Index.replace()

    }
   
    public Row.Entry replace(final Row.Entry row) throws IOException, RowSpaceExceededException {
        assert row.objectsize() <= this.rowdef.objectsize;
        Index keeper = keeperOf(row.getPrimaryKeyBytes());
        if (keeper != null) return keeper.replace(row);
        synchronized (this.tables) {
            assert this.current == null || this.tables.get(this.current) != null : "this.current = " + this.current;
            keeper = (this.current == null) ? newTable() : checkTable(this.tables.get(this.current));
        }
        keeper.put(row);
View Full Code Here

Examples of noop.model.Library.replace()

    LanguageElement currentValue = library.getElements().get(operation.vertex.index);
    if (currentValue.getClass() != operation.newValue.getClass()) {
      throw new IllegalArgumentException(String.format("Cannot edit node %s with %s because the current type is %s",
          operation.vertex, operation.newValue, currentValue.getClass()));
    }
    library.replace(operation.vertex.index, operation.newValue);
  }

  public void addEdge(NewEdgeOperation operation) {
    if (operation.src.vertex == Vertex.NONE) {
      throw new IllegalArgumentException("src element has no vertex");
View Full Code Here

Examples of org.antlr.runtime.TokenRewriteStream.replace()

      "C : 'c';\n");
    CharStream input = new ANTLRStringStream("abc");
    Interpreter lexEngine = new Interpreter(g, input);
    TokenRewriteStream tokens = new TokenRewriteStream(lexEngine);
    tokens.fill();
    tokens.replace(0, "x");
    String result = tokens.toString();
    String expecting = "xbc";
    assertEquals(expecting, result);
  }
View Full Code Here

Examples of org.antlr.v4.runtime.TokenStreamRewriter.replace()

    String input = "abc";
    LexerInterpreter lexEngine = g.createLexerInterpreter(new ANTLRInputStream(input));
    CommonTokenStream stream = new CommonTokenStream(lexEngine);
    stream.fill();
    TokenStreamRewriter tokens = new TokenStreamRewriter(stream);
    tokens.replace(0, "x");
    String result = tokens.getText();
    String expecting = "xbc";
    assertEquals(expecting, result);
  }
View Full Code Here

Examples of org.apache.cassandra.db.compaction.LeveledManifest.replace()

                                manifest.add(scrubber.getNewInOrderSSTable());

                            List<SSTableReader> added = scrubber.getNewSSTable() == null
                                ? Collections.<SSTableReader>emptyList()
                                : Collections.<SSTableReader>singletonList(scrubber.getNewSSTable());
                            manifest.replace(Collections.singletonList(sstable), added);
                        }

                        // Remove the sstable (it's been copied by scrub and snapshotted)
                        sstable.markCompacted();
                        sstable.releaseReference();
View Full Code Here

Examples of org.apache.commons.lang.text.StrSubstitutor.replace()

                    values.put( "localRepositoryUrl", toUrl( userLocalRepo ) );
                    StrSubstitutor strSubstitutor = new StrSubstitutor( values );

                    String fileContent = FileUtils.fileRead( new File( testBuildDirectory, "settings.xml" ) );

                    String filtered = strSubstitutor.replace( fileContent );

                    FileUtils.fileWrite( interpolatedSettings.getAbsolutePath(), filtered );

                }
View Full Code Here

Examples of org.apache.commons.lang3.text.StrSubstitutor.replace()

   
    Map<String, String> variables = email.getVariables();
    if(variables!=null){
      StrSubstitutor substitutor = new StrSubstitutor(variables, "${", "}");
      subject = substitutor.replace(subject);
      bodyHtml = substitutor.replace(bodyHtml);
      bodyText = substitutor.replace(bodyText);
    }
   
    if(senderName!=null){
      from = senderName+" <"+from+">";
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.