View Javadoc
1   /*
2    * MIT License
3    * Copyright (c) 2006-2025 JMockit developers
4    * See LICENSE file for full license text.
5    */
6   package mockit.internal.expectations.argumentMatching;
7   
8   import edu.umd.cs.findbugs.annotations.NonNull;
9   import edu.umd.cs.findbugs.annotations.Nullable;
10  
11  public final class InequalityMatcher extends EqualityMatcher {
12      public InequalityMatcher(@Nullable Object notEqualArg) {
13          super(notEqualArg);
14      }
15  
16      @Override
17      public boolean matches(@Nullable Object argValue) {
18          return !super.matches(argValue);
19      }
20  
21      @Override
22      public void writeMismatchPhrase(@NonNull ArgumentMismatch argumentMismatch) {
23          argumentMismatch.append("not ").appendFormatted(object);
24      }
25  }