org.hamcrest.core
Class IsNot<T>

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.hamcrest.core.IsNot<T>
All Implemented Interfaces:
org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing

public class IsNot<T>
extends org.hamcrest.BaseMatcher<T>

Calculates the logical negation of a matcher.


Constructor Summary
IsNot(org.hamcrest.Matcher<T> matcher)
           
 
Method Summary
 void describeTo(org.hamcrest.Description description)
           
 boolean matches(java.lang.Object arg)
           
static
<T> org.hamcrest.Matcher<T>
not(org.hamcrest.Matcher<T> matcher)
          Inverts the rule.
static
<T> org.hamcrest.Matcher<T>
not(T value)
          This is a shortcut to the frequently used not(equalTo(x)).
 
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IsNot

public IsNot(org.hamcrest.Matcher<T> matcher)
Method Detail

matches

public boolean matches(java.lang.Object arg)

describeTo

public void describeTo(org.hamcrest.Description description)

not

public static <T> org.hamcrest.Matcher<T> not(org.hamcrest.Matcher<T> matcher)
Inverts the rule.


not

public static <T> org.hamcrest.Matcher<T> not(T value)
This is a shortcut to the frequently used not(equalTo(x)). eg. assertThat(cheese, is(not(equalTo(smelly)))) vs assertThat(cheese, is(not(smelly)))