Class TestMap.TestEntry<K,V>

  • All Implemented Interfaces:
    Entry<K,V>
    Enclosing class:
    TestMap


    private static class TestMap.TestEntry<K,V>
    extends java.lang.Object
    implements Entry<K,V>
    Class to hold test entries for comparison
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      private K key 
      private V value 
    • Constructor Summary

      Constructors 
      Constructor and Description
      TestEntry(K k, V v)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(Entry<K,V> e)
      Returns equality of two entries
      K getKey()
      Returns the key stored in this entry.
      V getValue()
      Returns the value stored in this entry.
      • Methods inherited from class java.lang.Object

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

      • key

        private K key
      • value

        private V value
    • Constructor Detail

      • TestEntry

        public TestEntry(K k,
                         V v)
        Constructor
        Parameters:
        k - Key
        v - Value
    • Method Detail

      • getKey

        public K getKey()
        Returns the key stored in this entry.
        Specified by:
        getKey in interface Entry<K,V>
        Returns:
        the entry's key
      • getValue

        public V getValue()
        Returns the value stored in this entry.
        Specified by:
        getValue in interface Entry<K,V>
        Returns:
        the entry's value
      • equals

        public boolean equals(Entry<K,V> e)
        Returns equality of two entries
        Parameters:
        e - Entry
        Returns:
        Equality comparison of two entries