org.hamcrest.core.IsAnything Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-realer Show documentation
Show all versions of virtdata-lib-realer Show documentation
With inspiration from other libraries
/* Copyright (c) 2000-2006 hamcrest.org
*/
package org.hamcrest.core;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.Factory;
import org.hamcrest.BaseMatcher;
/**
* A matcher that always returns true
.
*/
public class IsAnything extends BaseMatcher {
private final String message;
public IsAnything() {
this("ANYTHING");
}
public IsAnything(String message) {
this.message = message;
}
@Override
public boolean matches(Object o) {
return true;
}
@Override
public void describeTo(Description description) {
description.appendText(message);
}
/**
* Creates a matcher that always matches, regardless of the examined object.
*/
@Factory
public static Matcher