PojoWithHashMapInnerKeySetAsDelegate fill() { Map<String, String> map1 = newMap(); map1.put("hello", "world"); map1.put("oh", "hi"); Map<String, String> map2 = newMap(); map2.put("abc", "123"); map2.put("good", "cool"); Map<String, String> map3 = newMap(); map3.put("yummy", "cake"); list = newList(map1.keySet()); set = map2.keySet(); map = newMap(); map.put("key", map3.keySet()); return this; }
PojoWithSingletonAsDelegate fill() { s2 = s1 = Singleton.INSTANCE; l3 = l1 = newList(Singleton.INSTANCE); l2 = newList(); l2.add(Singleton.INSTANCE); l4 = l2; m1 = newMap(); m1.put("s1", s1); m2 = newMap(); m2.put("s1", s1); m3 = newMap(); m3.put(s1, s1); m4 = newMap(); m4.put(s1, "s1"); m5 = m1; m6 = m2; m7 = m3; m8 = m4; return this; }
PojoWithShortArrayAsDelegate fill() { short[] s = new short[] { 0x7f7f, 0x7e7e }; s2 = s1 = s; l3 = l1 = newList(s); l2 = newList(); l2.add(s); l4 = l2; m1 = newMap(); m1.put("s1", s1); m2 = newMap(); m2.put("s1", s1); m3 = newMap(); m3.put(s1, s1); m4 = newMap(); m4.put(s1, "s1"); m5 = m1; m6 = m2; m7 = m3; m8 = m4; return this; }
PojoWithThrowable fill() { t1 = new Throwable("t1"); t2 = new Exception("t2", t1); o1 = t1; o2 = t2; e1 = new Exception("e1"); e2 = new RuntimeException("e2", e1); re1 = new RuntimeException("re1"); re2 = new RuntimeException("re2", re1); l1 = newList(t1, e1, re1); l2 = newList(o2, e2, re2); l3 = l1; l4 = l2; m1 = newMap(); m1.put("t1", t1); m2 = newMap(); m2.put("e1", e1); m3 = newMap(); m3.put(e2, re2); m4 = m1; m5 = m2; m6 = m3; return this; }
PojoWithMap fill() someMapStringKObjectV = newMap(); someMapStringKObjectV.put("1", new Pojo().fill()); someMapStringKObjectV.put(null, Size.SMALL); someMapStringKObjectV.put("3", 3); Map<Guitar, Object> mapGuitarKWildcardV = newMap(); mapGuitarKWildcardV.put(new BassGuitar(4, false), "passive 4 string"); someMapObjectKIntegerV = newMap(); someMapObjectKIntegerV.put(1, 1); someMapObjectKIntegerV.put(null, 2); someMapObjectKIntegerV.put("3", null); Map<Object, Size> mapWildcardKEnumV = newMap(); mapWildcardKEnumV.put("1", Size.SMALL); mapWildcardKEnumV.put(null, Size.MEDIUM); someMapObjectKObjectV = newMap(); someMapObjectKObjectV.put("foo", "bar"); someMapObjectKObjectV.put(1, Size.SMALL); someMapObjectKObjectV.put(null, null); Map<Object, Object> mapWildcardKWildcardV = newMap(); mapWildcardKWildcardV.put(null, null); mapWildcardKWildcardV.put("foo", 1);
HashMap<String, Boolean> empty = newMap();
new BassGuitar(4, true) }) }; Map<Size, String> mapEnumKStringVFirst = newMap(); mapEnumKStringVFirst.put(Size.SMALL, "s"); mapEnumKStringVFirst.put(Size.MEDIUM, null); Map<Size, String> mapEnumKStringVSecond = newMap(); mapEnumKStringVSecond.put(Size.LARGE, "l"); mapEnumKStringVSecond.put(null, "m"); mapEnumKStringVSecond }; Map<Guitar, Pojo> mapGuitarKPojoVFirst = newMap(); mapGuitarKPojoVFirst.put( new AcousticGuitar(GuitarPickup.SOUNDHOLE), null); Map<Guitar, Pojo> mapGuitarKPojoVSecond = newMap(); mapGuitarKPojoVSecond.put(null, new Pojo().fill()); Map<Object, Object> mapObjectKObjectVFirst = newMap(); mapObjectKObjectVFirst.put("foo", null); mapObjectKObjectVFirst.put(new Pojo().fill(), new BassGuitar(5, true)); Map<Object, Object> mapObjectKObjectVSecond = newMap(); mapObjectKObjectVSecond.put(null, new Date()); mapObjectKObjectVSecond.put(Size.MEDIUM, "m");
Map<Integer, String> mapIntegerKStringV = newMap(); mapIntegerKStringV.put(1, "1"); mapIntegerKStringV.put(null, "2"); Map<Size, Guitar> mapEnumKGuitarV = newMap(); mapEnumKGuitarV.put(Size.SMALL, new AcousticGuitar( GuitarPickup.CONTACT)); Map<Guitar, List<Size>> mapGuitarKEnumCollectionV = newMap(); mapGuitarKEnumCollectionV.put(new BassGuitar(4, false), newList(new Size[] { Size.SMALL })); Map<List<Guitar>, List<String>> mapGuitarCollectionKStringCollectionV = newMap(); mapGuitarCollectionKStringCollectionV.put(guitarK1, newList(new String[] { "1" })); Map<String, Size> mapKeyFirst = newMap(); mapKeyFirst.put("foo", Size.LARGE); mapKeyFirst.put(null, null); Map<String, Size> mapKeySecond = newMap(); mapKeySecond.put("bar", Size.MEDIUM); mapKeySecond.put("baz", null); Map<Date, Guitar> mapValueFirst = newMap(); mapValueFirst.put(new Date(System.currentTimeMillis() - 10000), new BassGuitar(5, false)); Map<Date, Guitar> mapValueSecond = newMap();