Class CapturingMatcher<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.Object> arguments  
      private java.util.concurrent.locks.ReadWriteLock lock  
      private java.util.concurrent.locks.Lock readLock  
      private java.util.concurrent.locks.Lock writeLock  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void captureFrom​(java.lang.Object argument)  
      java.util.List<T> getAllValues()  
      T getLastValue()  
      boolean matches​(java.lang.Object argument)
      Informs if this matcher accepts the given argument.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • arguments

        private final java.util.List<java.lang.Object> arguments
      • lock

        private final java.util.concurrent.locks.ReadWriteLock lock
      • readLock

        private final java.util.concurrent.locks.Lock readLock
      • writeLock

        private final java.util.concurrent.locks.Lock writeLock
    • Constructor Detail

      • CapturingMatcher

        public CapturingMatcher()
    • Method Detail

      • matches

        public boolean matches​(java.lang.Object argument)
        Description copied from interface: ArgumentMatcher
        Informs if this matcher accepts the given argument.

        The method should never assert if the argument doesn't match. It should only return false.

        See the example in the top level javadoc for ArgumentMatcher

        Specified by:
        matches in interface ArgumentMatcher<T>
        Parameters:
        argument - the argument
        Returns:
        true if this matcher accepts the given argument.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getLastValue

        public T getLastValue()
      • getAllValues

        public java.util.List<T> getAllValues()