示例#1
0
 protected void mergeDuration(Duration old, Duration duration) {
   old.setValue(duration.getValue());
   old.setCount(old.getCount() + duration.getCount());
   List<String> messages = old.getMessages();
   if (messages.size() < SIZE) {
     messages.addAll(duration.getMessages());
     if (messages.size() > SIZE) {
       messages = messages.subList(0, SIZE);
     }
   }
 }
示例#2
0
 @Override
 public void visitDuration(Duration duration) {
   int value = duration.getValue();
   Duration temp = m_currentEntry.findOrCreateDuration(value);
   mergeDuration(temp, duration);
 }