BaseMatcher (Hamcrest)
Date: 2012-07-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hamcrest
Class BaseMatcher<T>

    java.lang.Object
      org.hamcrest.BaseMatcher<T>

All Implemented Interfaces:
  Matcher<T>, SelfDescribing

Direct Known Subclasses:
  AnyOf, CustomMatcher, DescribedAs, DiagnosingMatcher, Is, IsAnything, IsEmptyString, IsEqual, IsIn, IsNot, IsNull, IsSame, TypeSafeDiagnosingMatcher, TypeSafeMatcher

    public abstract class BaseMatcher<T>

extends java.lang.Object
implements Matcher<T>

BaseClass for all Matcher implementations.

See Also:
  `Matcher`

Constructor Summary
`BaseMatcher()`

Method Summary
`void` | `_dont_implement_Matcher___instead_extend_BaseMatcher_()` Deprecated.
`void` | `describeMismatch(java.lang.Object item, Description description)` Generate a description of why the matcher has not accepted the item.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.hamcrest.Matcher
`matches`

Methods inherited from interface org.hamcrest.SelfDescribing
`describeTo`

Constructor Detail

### BaseMatcher

    public BaseMatcher()

Method Detail

### _dont_implement_Matcher___instead_extend_BaseMatcher_

    @Deprecated
    public final void _dont_implement_Matcher___instead_extend_BaseMatcher_()

  Deprecated.

  Description copied from interface: `Matcher`
  This method simply acts a friendly reminder not to implement Matcher directly and instead extend BaseMatcher. It's easy to ignore JavaDoc, but a bit harder to ignore compile errors .

  Specified by:
    `_dont_implement_Matcher___instead_extend_BaseMatcher_` in interface `Matcher<T>`
  See Also:
    `Matcher._dont_implement_Matcher___instead_extend_BaseMatcher_()`

### describeMismatch

    public void describeMismatch(java.lang.Object item,
                                 Description description)

  Description copied from interface: `Matcher`
  Generate a description of why the matcher has not accepted the item. The description will be part of a larger description of why a matching failed, so it should be concise. This method assumes that `matches(item)` is false, but will not check this.

  Specified by:
    `describeMismatch` in interface `Matcher<T>`
  Parameters:
    `item` - The item that the Matcher has rejected.
    `description` - The description to be built or appended to.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD