Class TestMap



  • public class TestMap
    extends java.lang.Object
    Class to unit test an arbitrary map implementation
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      private static class  TestMap.TestEntry<K,V>
      Class to hold test entries for comparison
    • Constructor Summary

      Constructors 
      Constructor and Description
      TestMap() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args) 
      static <M extends Map<java.lang.Integer,java.lang.String>>
      boolean
      TestEntrySet(java.util.function.Supplier<M> c)
      Test entrySet method of arbitrary map
      static <M extends Map<java.lang.Integer,java.lang.String>>
      boolean
      TestGet(java.util.function.Supplier<M> c)
      Test get method of arbitrary map
      static <M extends Map<java.lang.Integer,java.lang.String>>
      void
      TestMap(java.lang.String s, java.util.function.Supplier<M> c)
      Test methods of arbitrary map
      static <M extends Map<java.lang.Integer,java.lang.String>>
      boolean
      TestPut(java.util.function.Supplier<M> c)
      Test get method of arbitrary map
      static <M extends Map<java.lang.Integer,java.lang.String>>
      boolean
      TestRemove(java.util.function.Supplier<M> c)
      Test get method of arbitrary map
      • Methods inherited from class java.lang.Object

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

      • TestMap

        public TestMap()
    • Method Detail

      • TestGet

        public static <M extends Map<java.lang.Integer,java.lang.String>> boolean TestGet(java.util.function.Supplier<M> c)
        Test get method of arbitrary map
        Type Parameters:
        M - Specific map structure
        Parameters:
        c - Supplier to create a map of specific type
        Returns:
        Result of unit test
      • TestPut

        public static <M extends Map<java.lang.Integer,java.lang.String>> boolean TestPut(java.util.function.Supplier<M> c)
        Test get method of arbitrary map
        Type Parameters:
        M - Specific map structure
        Parameters:
        c - Supplier to create a map of specific type
        Returns:
        Result of unit test
      • TestRemove

        public static <M extends Map<java.lang.Integer,java.lang.String>> boolean TestRemove(java.util.function.Supplier<M> c)
        Test get method of arbitrary map
        Type Parameters:
        M - Specific map structure
        Parameters:
        c - Supplier to create a map of specific type
        Returns:
        Result of unit test
      • TestEntrySet

        public static <M extends Map<java.lang.Integer,java.lang.String>> boolean TestEntrySet(java.util.function.Supplier<M> c)
        Test entrySet method of arbitrary map
        Type Parameters:
        M - Specific map structure
        Parameters:
        c - Supplier to create a map of specific type
        Returns:
        Result of unit test
      • TestMap

        public static <M extends Map<java.lang.Integer,java.lang.String>> void TestMap(java.lang.String s,
                                                                                       java.util.function.Supplier<M> c)
        Test methods of arbitrary map
        Type Parameters:
        M - Specific map structure
        Parameters:
        s - Name of map data structure
        c - Supplier to create a map of specific type
      • main

        public static void main(java.lang.String[] args)