當前位置: 首頁>>代碼示例>>Java>>正文


Java ProcV類代碼示例

本文整理匯總了Java中org.waveprotocol.wave.model.util.IdentityMap.ProcV的典型用法代碼示例。如果您正苦於以下問題:Java ProcV類的具體用法?Java ProcV怎麽用?Java ProcV使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ProcV類屬於org.waveprotocol.wave.model.util.IdentityMap包,在下文中一共展示了ProcV類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: cancelAll

import org.waveprotocol.wave.model.util.IdentityMap.ProcV; //導入依賴的package包/類
@Override
public void cancelAll() {
  taskInfos.each(new ProcV<Schedulable, TaskInfo>(){

    @Override
    public void apply(Schedulable command, TaskInfo info) {
      cancel(command);
    }
  });
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:11,代碼來源:BrowserBackedScheduler.java

示例2: tasks

import org.waveprotocol.wave.model.util.IdentityMap.ProcV; //導入依賴的package包/類
private String tasks() {
  final StringBuilder b = new StringBuilder();
  taskInfos.each(new ProcV<Schedulable, TaskInfo>() {
    @Override
    public void apply(Schedulable key, TaskInfo item) {
      b.append("{ task: " + item);
      b.append("; ");
      b.append("job: " + key + " } ");
    }
  });
  return b.toString();
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:13,代碼來源:BrowserBackedScheduler.java

示例3: render

import org.waveprotocol.wave.model.util.IdentityMap.ProcV; //導入依賴的package包/類
@Override
public FakeBlipView render(ConversationBlip blip, View document,
    IdentityMap<ConversationThread, View> defaultAnchors,
    IdentityMap<Conversation, View> nestedReplies) {
  LinkedSequence<FakeAnchor> anchorsUi = LinkedSequence.create();
  for (ConversationThread reply : blip.getReplyThreads()) {
    anchorsUi.append((FakeAnchor) defaultAnchors.get(reply));
  }
  LinkedSequence<FakeInlineConversationView> nestedUis = LinkedSequence.create();
  // Order by conversation id. Ideally, the sort key would be creation
  // time, but that is not exposed in the conversation API.
  final List<Conversation> ordered = CollectionUtils.newArrayList();
  nestedReplies.each(new ProcV<Conversation, View>() {
    @Override
    public void apply(Conversation conv, View ui) {
      ordered.add(conv);
    }
  });
  Collections.sort(ordered, new Comparator<Conversation>() {
    @Override
    public int compare(Conversation o1, Conversation o2) {
      return o1.getId().compareTo(o2.getId());
    }
  });
  for (Conversation nested : ordered) {
    nestedUis.append((FakeInlineConversationView) nestedReplies.get(nested));
  }
  FakeBlipView blipUi = views.createBlipView(blip, anchorsUi, nestedUis);
  blipUi.getMeta().setContent((FakeDocumentView) document);
  return blipUi;
}
 
開發者ID:apache,項目名稱:incubator-wave,代碼行數:32,代碼來源:FakeRenderer.java

示例4: destroy

import org.waveprotocol.wave.model.util.IdentityMap.ProcV; //導入依賴的package包/類
/**
 * Destroys this renderer, releasing its resources. It is no longer usable
 * after a call to this method.
 */
public void destroy() {
  wave.removeListener(this);
  conversationRenderers.each(new ProcV<Conversation, LiveConversationRenderer>() {
    @Override
    public void apply(Conversation c, LiveConversationRenderer value) {
      value.destroy();
    }
  });
  supplementRenderer.destroy();
}
 
開發者ID:apache,項目名稱:incubator-wave,代碼行數:15,代碼來源:LiveConversationViewRenderer.java


注:本文中的org.waveprotocol.wave.model.util.IdentityMap.ProcV類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。