Any.java revision e0ae5d7e87b1dd6e789803c1b9615a84bd7488b7
1/* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6package org.mockito.internal.matchers; 7 8import java.io.Serializable; 9 10import org.hamcrest.Description; 11import org.mockito.ArgumentMatcher; 12 13@SuppressWarnings("unchecked") 14public class Any extends ArgumentMatcher implements Serializable { 15 16 private static final long serialVersionUID = -4062420125651019029L; 17 public static final Any ANY = new Any(); 18 19 private Any() {} 20 21 public boolean matches(Object actual) { 22 return true; 23 } 24 25 public void describeTo(Description description) { 26 description.appendText("<any>"); 27 } 28} 29