public List findPagePositionsByID(CssContext c, Pattern pattern) { Map idMap = _sharedContext.getIdMap(); if (idMap == null) { return Collections.EMPTY_LIST; } List result = new ArrayList(); for (Iterator i = idMap.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Entry) i.next(); String id = (String) entry.getKey(); if (pattern.matcher(id).find()) { Box box = (Box) entry.getValue(); PagePosition pos = calcPDFPagePosition(c, id, box); if (pos != null) { result.add(pos); } } } Collections.sort(result, new Comparator() { public int compare(Object arg0, Object arg1) { PagePosition p1 = (PagePosition) arg0; PagePosition p2 = (PagePosition) arg1; return p1.getPageNo() - p2.getPageNo(); } }); return result; }
public List findPagePositionsByID(CssContext c, Pattern pattern) { Map idMap = _sharedContext.getIdMap(); if (idMap == null) { return Collections.EMPTY_LIST; } List result = new ArrayList(); for (Iterator i = idMap.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Entry) i.next(); String id = (String) entry.getKey(); if (pattern.matcher(id).find()) { Box box = (Box) entry.getValue(); PagePosition pos = calcPDFPagePosition(c, id, box); if (pos != null) { result.add(pos); } } } Collections.sort(result, new Comparator() { public int compare(Object arg0, Object arg1) { PagePosition p1 = (PagePosition) arg0; PagePosition p2 = (PagePosition) arg1; return p1.getPageNo() - p2.getPageNo(); } }); return result; }
public List findPagePositionsByID(CssContext c, Pattern pattern) { Map idMap = _sharedContext.getIdMap(); if (idMap == null) { return Collections.EMPTY_LIST; } List result = new ArrayList(); for (Iterator i = idMap.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Entry) i.next(); String id = (String) entry.getKey(); if (pattern.matcher(id).find()) { Box box = (Box) entry.getValue(); PagePosition pos = calcPDFPagePosition(c, id, box); if (pos != null) { result.add(pos); } } } Collections.sort(result, new Comparator() { public int compare(Object arg0, Object arg1) { PagePosition p1 = (PagePosition) arg0; PagePosition p2 = (PagePosition) arg1; return p1.getPageNo() - p2.getPageNo(); } }); return result; }
public List findPagePositionsByID(CssContext c, Pattern pattern) { Map idMap = _sharedContext.getIdMap(); if (idMap == null) { return Collections.EMPTY_LIST; } List result = new ArrayList(); for (Iterator i = idMap.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Entry)i.next(); String id = (String)entry.getKey(); if (pattern.matcher(id).find()) { Box box = (Box)entry.getValue(); PagePosition pos = calcPDFPagePosition(c, id, box); if (pos != null) { result.add(pos); } } } Collections.sort(result, new Comparator() { public int compare(Object arg0, Object arg1) { PagePosition p1 = (PagePosition)arg0; PagePosition p2 = (PagePosition)arg1; return p1.getPageNo() - p2.getPageNo(); } }); return result; }
if (pattern.matcher(id).find()) { Box box = (Box)entry.getValue(); PagePosition pos = calcPDFPagePosition(c, id, box); if (pos != null) { result.add(pos);