@Override public final <T> Lookup.Item<T> lookupItem(Lookup.Template<T> template) { AbstractLookup.this.beforeLookup(template); ArrayList<Pair<T>> list = null; AbstractLookup.Storage<?> t = enterStorage(); try { Enumeration<Pair<T>> en; try { en = t.lookup(template.getType()); return findSmallest(en, template, false); } catch (AbstractLookup.ISE ex) { // not possible to enumerate the exception, ok, copy it // to create new list = new ArrayList<Pair<T>>(); en = t.lookup(null); // this should get all the items without any checks // the checks will be done out side of the storage while (en.hasMoreElements()) { list.add(en.nextElement()); } } } finally { exitStorage(); } return findSmallest(Collections.enumeration(list), template, true); }
@Override public final <T> Lookup.Item<T> lookupItem(Lookup.Template<T> template) { AbstractLookup.this.beforeLookup(template); ArrayList<Pair<T>> list = null; AbstractLookup.Storage<?> t = enterStorage(); try { Enumeration<Pair<T>> en; try { en = t.lookup(template.getType()); return findSmallest(en, template, false); } catch (AbstractLookup.ISE ex) { // not possible to enumerate the exception, ok, copy it // to create new list = new ArrayList<Pair<T>>(); en = t.lookup(null); // this should get all the items without any checks // the checks will be done out side of the storage while (en.hasMoreElements()) { list.add(en.nextElement()); } } } finally { exitStorage(); } return findSmallest(Collections.enumeration(list), template, true); }
return findSmallest (en, template, false); } catch (AbstractLookup.ISE ex) { return findSmallest (Collections.enumeration (list), template, true);
@Override public final <T> Lookup.Item<T> lookupItem(Lookup.Template<T> template) { AbstractLookup.this.beforeLookup(template); ArrayList<Pair<T>> list = null; AbstractLookup.Storage<?> t = enterStorage(); try { Enumeration<Pair<T>> en; try { en = t.lookup(template.getType()); return findSmallest(en, template, false); } catch (AbstractLookup.ISE ex) { // not possible to enumerate the exception, ok, copy it // to create new list = new ArrayList<Pair<T>>(); en = t.lookup(null); // this should get all the items without any checks // the checks will be done out side of the storage while (en.hasMoreElements()) { list.add(en.nextElement()); } } } finally { exitStorage(); } return findSmallest(Collections.enumeration(list), template, true); }
return findSmallest (en, template, false); } catch (AbstractLookup.ISE ex) { return findSmallest (Collections.enumeration (list), template, true);