@Override public HashMap<K, V> tail() { if (trie.isEmpty()) { throw new UnsupportedOperationException("tail of empty HashMap"); } else { return remove(head()._1); } }
@Override public HashMap<K, V> tail() { if (trie.isEmpty()) { throw new UnsupportedOperationException("tail of empty HashMap"); } else { return remove(head()._1); } }
@Test public void testHashMapClass() throws Exception { HashMapClass src = new HashMapClass(HashMap.of(42, new ImplementedClass())); String json = MAPPER.writeValueAsString(src); HashMapClass restored = MAPPER.readValue(json, HashMapClass.class); Assert.assertEquals(restored.value.head()._2.getClass(), ImplementedClass.class); }