/** * Called to create a map the parent of each bookmark. * * @param parent top level bookmark. * @param parentMap map to add children to. * @param pagenoVector vector of page numbers. * @param depth object indicating bookmark depth. */ protected void mapChildren( final Bookmark parent, final Hashtable parentMap, final Vector pagenoVector, final Number depth) { getDepthMap().put(parent, depth); final int pageno = parent.getPageno(); if (pageno >= 0) { while (pageno >= pagenoVector.size()) { pagenoVector.addElement(null); } pagenoVector.setElementAt(parent, pageno); } final Enumeration e = parent.elements(); if (e.hasMoreElements()) { final Number childDepth = new Integer(depth.intValue() + 1); do { final Bookmark child = (Bookmark) e.nextElement(); parentMap.put(child, parent); mapChildren(child, parentMap, pagenoVector, childDepth); } while (e.hasMoreElements()); } }
/** * Set the value of this object as a Number. * * @return True if the value was set. */ public boolean setCurrentAccessibleValue(Number n) { // TIGER - 4422535 if (n == null) { return false; } setValue(n.intValue()); return true; }