Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) 2007 Mockito contributors
  * This program is made available under the terms of the MIT License.
  */
 package org.mockito.internal.verification;
 
public class RegisteredInvocations implements Serializable {
    private static final long serialVersionUID = -2674402327380736290L;
    private final List<Invocationinvocations = Collections.synchronizedList(new LinkedList<Invocation>());
    
    public void add(Invocation invocation) {
        .add(invocation);
    }
    public void removeLast() {
        .remove(.size()-1);
    }
    public List<InvocationgetAll() {
        return ListUtil.filter(new LinkedList<Invocation>(), new RemoveToString());
    }
    
    private static class RemoveToString implements Filter<Invocation> {
        public boolean isOut(Invocation invocation) {
            return Invocation.isToString(invocation);
        }
    }
New to GrepCode? Check out our FAQ X