JavaLangMatcherAssert.java :  » REST » hamcrest » org » hamcrest » Java Open Source

Java Open Source » REST » hamcrest 
hamcrest » org » hamcrest » JavaLangMatcherAssert.java
package org.hamcrest;

/**
 * Integration method for use with Java's <code>assert</code> keyword.
 * Example:
 * <pre>
 * assert that("Foo", startsWith("f"));
 * </pre>
 *
 * @author Neil Dunn
 */
public class JavaLangMatcherAssert {
    private JavaLangMatcherAssert() {};

    public static <T> boolean that(T argument, Matcher<? super T> matcher) {
        return matcher.matches(argument);
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.