本文整理汇总了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);
}
});
}
示例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();
}
示例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;
}
示例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();
}