当前位置: 首页>>代码示例>>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;未经允许,请勿转载。