@Test public void testAddSelector() { final Type testType = mock(Type.class); final SelectorElement se = mock(SelectorElement.class); selector.addSelector(testType, se); assertNotNull(selector.get(testType)); assertEquals(1, selector.get(testType).size()); selector.addSelector(testType, mock(BooleanSelectorElement.class)); assertEquals(2, selector.get(testType).size()); }
public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } } }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } }  }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } }  void addSelector(final Type type, final SelectorElement se); @Override SelectorQueryPlan accept(SelectorQueryVisitor selectorQueryVisitor); @Override String toString(); }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } }  void addSelector(final Type type, final SelectorElement se); @Override SelectorQueryPlan accept(SelectorQueryVisitor selectorQueryVisitor); @Override String toString();  }