/** * Tell if the table contains the given node. * * @param s Node to look for * * @return True if the given node was found. */ public boolean contains(Node s) { runTo(-1); if (null == m_map) return false; for (int i = 0; i < m_firstFree; i++) { Node node = m_map[i]; if ((null != node) && node.equals(s)) return true; } return false; }
/** * Searches for the first occurence of the given argument, * beginning the search at index, and testing for equality * using the equals method. * * @param elem Node to look for * @param index Index of where to start the search * @return the index of the first occurrence of the object * argument in this vector at position index or later in the * vector; returns -1 if the object is not found. */ public int indexOf(Node elem, int index) { runTo(-1); if (null == m_map) return -1; for (int i = index; i < m_firstFree; i++) { Node node = m_map[i]; if ((null != node) && node.equals(elem)) return i; } return -1; }
/** * Searches for the first occurence of the given argument, * beginning the search at index, and testing for equality * using the equals method. * * @param elem Node to look for * @return the index of the first occurrence of the object * argument in this vector at position index or later in the * vector; returns -1 if the object is not found. */ public int indexOf(Node elem) { runTo(-1); if (null == m_map) return -1; for (int i = 0; i < m_firstFree; i++) { Node node = m_map[i]; if ((null != node) && node.equals(elem)) return i; } return -1; }
/** * Tell if the table contains the given node. * * @param s Node to look for * * @return True if the given node was found. */ public boolean contains(Node s) { runTo(-1); if (null == m_map) return false; for (int i = 0; i < m_firstFree; i++) { Node node = m_map[i]; if ((null != node) && node.equals(s)) return true; } return false; }
/** * Searches for the first occurence of the given argument, * beginning the search at index, and testing for equality * using the equals method. * * @param elem Node to look for * @return the index of the first occurrence of the object * argument in this vector at position index or later in the * vector; returns -1 if the object is not found. */ public int indexOf(Node elem) { runTo(-1); if (null == m_map) return -1; for (int i = 0; i < m_firstFree; i++) { Node node = m_map[i]; if ((null != node) && node.equals(elem)) return i; } return -1; }
/** * Searches for the first occurence of the given argument, * beginning the search at index, and testing for equality * using the equals method. * * @param elem Node to look for * @param index Index of where to start the search * @return the index of the first occurrence of the object * argument in this vector at position index or later in the * vector; returns -1 if the object is not found. */ public int indexOf(Node elem, int index) { runTo(-1); if (null == m_map) return -1; for (int i = index; i < m_firstFree; i++) { Node node = m_map[i]; if ((null != node) && node.equals(elem)) return i; } return -1; }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * Returns the <code>index</code>th item in the collection. If * <code>index</code> is greater than or equal to the number of nodes in * the list, this returns <code>null</code>. * * TODO: What happens if index is out of range? * * @param index Index into the collection. * @return The node at the <code>index</code>th position in the * <code>NodeList</code>, or <code>null</code> if that is not a valid * index. */ public Node item(int index) { runTo(index); return (Node) this.elementAt(index); }
/** * Returns the <code>index</code>th item in the collection. If * <code>index</code> is greater than or equal to the number of nodes in * the list, this returns <code>null</code>. * * TODO: What happens if index is out of range? * * @param index Index into the collection. * @return The node at the <code>index</code>th position in the * <code>NodeList</code>, or <code>null</code> if that is not a valid * index. */ public Node item(int index) { runTo(index); return (Node) this.elementAt(index); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * The number of nodes in the list. The range of valid child node indices is * 0 to <code>length-1</code> inclusive. Note that this operation requires * finding all the matching nodes, which may defeat attempts to defer * that work. * * @return integer indicating how many nodes are represented by this list. */ public int getLength() { runTo(-1); return this.size(); }
/** * Returns the <code>index</code>th item in the collection. If * <code>index</code> is greater than or equal to the number of nodes in * the list, this returns <code>null</code>. * * TODO: What happens if index is out of range? * * @param index Index into the collection. * @return The node at the <code>index</code>th position in the * <code>NodeList</code>, or <code>null</code> if that is not a valid * index. */ public Node item(int index) { runTo(index); return (Node) this.elementAt(index); }