de.caff.generics.matcher

## Class ReferenceMatcher

- java.lang.Object
- - de.caff.generics.matcher.ReferenceMatcher

- All Implemented Interfaces:
    Matcher<java.lang.Object,java.lang.Object>, UniformMatcher<java.lang.Object>, java.util.function.BiPredicate<java.lang.Object,java.lang.Object>

      public class ReferenceMatcher
      extends java.lang.Object
      implements UniformMatcher<java.lang.Object>

  A reference matcher is only accepting reference equality. I.e. any object matches only with itself. The value `null` is handled.
  Author:
    Rammi
  See Also:
    `Match.REFERENCE_MATCHER`

- - ### Field Summary

    - ### Fields inherited from interface de.caff.generics.UniformMatcher

      `IDENTICAL, NATURAL, NATURAL_NULL_SAFE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReferenceMatcher()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `areEqual(java.lang.Object object1, java.lang.Object object2)` Are the given two objects considered equal?

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface de.caff.generics.UniformMatcher

      `identical, natural, naturalNullSafe`

    - ### Methods inherited from interface de.caff.generics.Matcher

      `foldLeft, foldRight, test`

    - ### Methods inherited from interface java.util.function.BiPredicate

      `and, negate, or`

- - ### Constructor Detail

    - #### ReferenceMatcher

          public ReferenceMatcher()

  - ### Method Detail

    - #### areEqual

          public boolean areEqual(java.lang.Object object1,
                                  java.lang.Object object2)

      Are the given two objects considered equal?
      Specified by:
        `areEqual` in interface `Matcher<java.lang.Object,java.lang.Object>`
      Parameters:
        `object1` - object 1
        `object2` - object 2
      Returns:
        `true` if this matcher considers the two object equals
        `false` if this matcher considers them different