Code example for ListMultimap

Methods: get

0
				" def dispatch foo(Object i) {null}" + 
				" def dispatch foo(CharSequence i) {null}" + 
			"}"); 
		JvmGenericType type = associations.getInferredType(clazz);
		ListMultimap<DispatchSignature,JvmOperation> multimap = dispatchHelper.getDeclaredOrEnhancedDispatchMethods(type);
		List<JvmOperation> list = multimap.get(new DispatchHelper.DispatchSignature("foo", 1));
		Iterator<JvmOperation> i = list.iterator();
		assertEquals(Integer.class.getName(), i.next().getParameters().get(0).getParameterType().getIdentifier());
		assertEquals(Number.class.getName(), i.next().getParameters().get(0).getParameterType().getIdentifier());
		assertEquals(String.class.getName(), i.next().getParameters().get(0).getParameterType().getIdentifier());
		assertEquals(Serializable.class.getName(), i.next().getParameters().get(0).getParameterType().getIdentifier());
		assertEquals(CharSequence.class.getName(), i.next().getParameters().get(0).getParameterType().getIdentifier());
		assertEquals(Comparable.class.getName(), i.next().getParameters().get(0).getParameterType().getType().getIdentifier());
		assertEquals(Object.class.getName(), i.next().getParameters().get(0).getParameterType().getIdentifier());
		assertFalse(i.hasNext());
	} 
	 
	@Test public void testSort_01() throws Exception {
		XtendClass clazz = clazz("class X {\n" +
				" def dispatch foo(Integer i) {null}" + 
Contextual code suggestions in your IDE  Get Codota for Java