private void addToCollectionInternal(Map map, Class<?> key, Class<?> value, boolean inheritance) { Collection coll = (Collection) map.get(key); if (coll == null) { if (inheritance) { InheritanceComparator comp = new InheritanceComparator(); comp.setBase(key); coll = new TreeSet<Class<?>>(comp); } else coll = new LinkedList<Class<?>>(); map.put(key, coll); } coll.add(value); }
private void addToCollectionInternal(Map map, Class<?> key, Class<?> value, boolean inheritance) { Collection coll = (Collection) map.get(key); if (coll == null) { if (inheritance) { InheritanceComparator comp = new InheritanceComparator(); comp.setBase(key); coll = new TreeSet<Class<?>>(comp); } else coll = new LinkedList<Class<?>>(); map.put(key, coll); } coll.add(value); }
private void addToCollectionInternal(Map map, Class<?> key, Class<?> value, boolean inheritance) { Collection coll = (Collection) map.get(key); if (coll == null) { if (inheritance) { InheritanceComparator comp = new InheritanceComparator(); comp.setBase(key); coll = new TreeSet<Class<?>>(comp); } else coll = new LinkedList<Class<?>>(); map.put(key, coll); } coll.add(value); }
private void addToCollectionInternal(Map map, Class<?> key, Class<?> value, boolean inheritance) { Collection coll = (Collection) map.get(key); if (coll == null) { if (inheritance) { InheritanceComparator comp = new InheritanceComparator(); comp.setBase(key); coll = new TreeSet<Class<?>>(comp); } else coll = new LinkedList<Class<?>>(); map.put(key, coll); } coll.add(value); }
/** * Add the given value to the collection cached in the given map under * the given key. */ private void addToCollection(Map map, Class key, Class value, boolean inheritance) { synchronized (map) { Collection coll = (Collection) map.get(key); if (coll == null) { if (inheritance) { InheritanceComparator comp = new InheritanceComparator(); comp.setBase(key); coll = new TreeSet(comp); } else coll = new LinkedList(); map.put(key, coll); } coll.add(value); } }