Пример #1
0
 /**
  * Add a new row to management. The lowest valued available row will be used.
  *
  * @return the row index of the newly added row
  */
 public int addRow() {
   int r;
   if (m_openRows == null || m_openRows.isEmpty()) {
     r = (m_firstId == 0 ? ++m_curId : --m_firstId);
   } else {
     int key = m_openRows.firstKey();
     r = m_openRows.remove(key);
   }
   return r;
 }