Class Matchers.Only

  • All Implemented Interfaces:
    Matcher<java.lang.Object>, java.io.Serializable
    Enclosing class:
    Matchers

    private static class Matchers.Only
    extends AbstractMatcher<java.lang.Object>
    implements java.io.Serializable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
      private java.lang.Object value  
    • Constructor Summary

      Constructors 
      Constructor Description
      Only​(java.lang.Object value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      boolean matches​(java.lang.Object other)
      Returns true if this matches t, false otherwise.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • value

        private final java.lang.Object value
    • Constructor Detail

      • Only

        public Only​(java.lang.Object value)
    • Method Detail

      • matches

        public boolean matches​(java.lang.Object other)
        Description copied from interface: Matcher
        Returns true if this matches t, false otherwise.
        Specified by:
        matches in interface Matcher<java.lang.Object>
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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