/** * @see javax.swing.table.TableModel#getRowCount() */ public int getRowCount() { return m_table.getRowCount(); } /**
/** * Get the number of tuples in this table. This is the same as the * value returned by {@link #getRowCount()}. * @return the number of tuples, which is the same as the number of rows * @see prefuse.data.tuple.TupleSet#getTupleCount() */ public int getTupleCount() { return getRowCount(); }
/** * Get the number of rows in the table. * @return the number of rows */ public int getRowCount() { return this.table.getRowCount(); }
@Override public int getMaximumRow() { return m_table.getRowCount() - 1; }
@Override public int getRowCount() { return m_table.getRowCount(); }
/** * Ensure the tuple array exists. */ private void ensureTupleArray(int row) { int nRows = Math.max(m_table.getRowCount(), row+1); if ( m_tuples == null ) { m_tuples = new TableTuple[nRows]; } else if ( m_tuples.length < nRows ) { int capacity = Math.max((3*m_tuples.length)/2 + 1, nRows); TableTuple[] tuples = new TableTuple[capacity]; System.arraycopy(m_tuples, 0, tuples, 0, m_tuples.length); m_tuples = tuples; } }
/** * Get the number of nodes in this graph. * @return the number of nodes */ public int getNodeCount() { return getNodeTable().getRowCount(); }
/** * Get the number of edges in this graph. * @return the number of edges */ public int getEdgeCount() { return getEdgeTable().getRowCount(); }
/** * @see java.lang.Object#toString() */ public String toString() { StringBuffer sbuf = new StringBuffer(); sbuf.append("Table["); sbuf.append("rows=").append(getRowCount()); sbuf.append(", cols=").append(getColumnCount()); sbuf.append(", maxrow=").append(m_rows.getMaximumRow()); sbuf.append("]"); return sbuf.toString(); }
/** * Create a new FilteredRowManager. * @param table the table to manage */ public FilteredRowManager(Table table) { super(table); m_childToParent = new IntColumn(table.getRowCount()); m_parentToChild = new IntIntTreeMap(false); clear(); }
/** * Initialize mapping between prefuse table rows and the rows reported * by this model. */ private void initRowMap() { m_rowMap = new int[m_table.getRowCount()]; IntIterator rows = m_table.rows(); for ( int i=0; rows.hasNext(); ++i ) { m_rowMap[i] = rows.nextInt(); } }
int rowcount = this.plot_tab.getRowCount(); HashSet<String> states = new HashSet<String>(); String curr_state = null;
/** * Adds a column to given table by converting timestamp to long with * seconds since epoch, and adding milliseconds from additional column * in original table * * @param origTable Table to add to * @param srcFieldName Name of column containing timestamp * @param srcMillisecondFieldName Name of column containing millisecond value of time * @param dstFieldName Name of new column to add * * @return Modified table with added column */ protected Table addTimeCol (Table origTable, String srcFieldName, String srcMillisecondFieldName, String dstFieldName) { origTable.addColumn(dstFieldName, long.class); int total_rows = origTable.getRowCount(); for (int curr_row_num = 0; curr_row_num < total_rows; curr_row_num++) { origTable.setLong(curr_row_num, dstFieldName, ((Timestamp)origTable.get(curr_row_num, srcFieldName)).getTime() + origTable.getLong(curr_row_num, srcMillisecondFieldName) ); } return origTable; }
for (int i = 0; i < rs_tab.getRowCount(); i++) { String curr_state = rs_tab.getString(i, "state_name"); Integer cnt = state_counts.get(curr_state); log.info("Search complete: #cols: " + rs_tab.getColumnCount() + "; #rows: " + rs_tab.getRowCount());
protected Table setupDataTable() { Table res_tab = this.getData(); if (res_tab == null) { return res_tab; } res_tab.addColumn("seqno","ROW()"); res_tab = addTimeOffsetCol(res_tab, "start_time", "start_time_millis", START_FIELD_NAME, 0); ColumnMetadata dstcol = res_tab.getMetadata(START_FIELD_NAME); long mintime = ((Timestamp)res_tab.get(dstcol.getMinimumRow(), "start_time")).getTime(); res_tab = addTimeOffsetCol(res_tab, "finish_time", "finish_time_millis", END_FIELD_NAME, mintime); res_tab.addColumn(PolygonRenderer.POLYGON,float[].class); log.debug("After adding seqno: #cols: " + res_tab.getColumnCount() + "; #rows: " + res_tab.getRowCount()); return res_tab; }
/** * Create a new ExpressionColumn. * @param table the table this column is a member of * @param expr the expression used to provide the column values */ public ExpressionColumn(Table table, Expression expr) { super(expr.getType(table.getSchema())); m_table = table; m_expr = expr; m_listener = new Listener(); init(); int nRows = m_table.getRowCount(); m_cache = ColumnFactory.getColumn(getColumnType(), nRows); m_valid = new BitSet(nRows); m_expr.addExpressionListener(m_listener); }
if ( t.getRowCount() < OPTIMIZATION_THRESHOLD ) return null; // avoid overhead for small tables