本文整理匯總了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();
}