/** * Log a dervivation record against the given triple. */ @Override public void logDerivation(Triple t, Derivation derivation) { derivations.put(t, derivation); }
public void testPutAll1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s3, s4 ); Map<String, String> map1 = new HashMap<>(); map1.put( s3, s4 ); map1.put( s0, s1 ); OneToManyMap<String, String> map2 = new OneToManyMap<>(); map2.putAll( map1 ); assertEquals( map0, map2 ); }
/** * Log a derivation record against the given triple. */ @Override public void logDerivation(Triple t, Derivation derivation) { derivations.put(t, derivation); }
public void testPutAll1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s3, s4 ); Map<String, String> map1 = new HashMap<>(); map1.put( s3, s4 ); map1.put( s0, s1 ); OneToManyMap<String, String> map2 = new OneToManyMap<>(); map2.putAll( map1 ); assertEquals( map0, map2 ); }
/** * Log a dervivation record against the given triple. */ @Override public void logDerivation(Triple t, Derivation derivation) { derivations.put(t, derivation); }
/** * Log a derivation record against the given triple. */ @Override public void logDerivation(Triple t, Derivation derivation) { derivations.put(t, derivation); }
public void testKeySet() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); Set<String> keys = new HashSet<>(); assertEquals( keys, map0.keySet() ); map0.put( s0, s1 ); keys.add( s0 ); assertEquals( keys, map0.keySet() ); map0.put( s2, s1 ); keys.add( s2 ); assertEquals( keys, map0.keySet() ); }
public void testKeySet() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); Set<String> keys = new HashSet<>(); assertEquals( keys, map0.keySet() ); map0.put( s0, s1 ); keys.add( s0 ); assertEquals( keys, map0.keySet() ); map0.put( s2, s1 ); keys.add( s2 ); assertEquals( keys, map0.keySet() ); }
public void testConstruct1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); OneToManyMap<String, String> map1 = new OneToManyMap<>( map0 ); assertTrue( map1.contains( s0, s1 ) ); map0.put( s0, s2 ); assertTrue( map0.contains( s0, s2 ) ); assertFalse( map1.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); }
public void testConstruct1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); OneToManyMap<String, String> map1 = new OneToManyMap<>( map0 ); assertTrue( map1.contains( s0, s1 ) ); map0.put( s0, s2 ); assertTrue( map0.contains( s0, s2 ) ); assertFalse( map1.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); }
public void testContainsKey() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); map0.put( s0, s1 ); assertTrue( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); }
public void testContainsKey() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); map0.put( s0, s1 ); assertTrue( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); }
public void testClear() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); assertFalse( map0.isEmpty() ); map0.clear(); assertFalse( map0.contains( s0, s1 ) ); assertTrue( map0.isEmpty() ); }
public void testClear() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); assertFalse( map0.isEmpty() ); map0.clear(); assertFalse( map0.contains( s0, s1 ) ); assertTrue( map0.isEmpty() ); }