/** * Get the data value at the given field as a <code>long</code>. * @param field the data field to retrieve * @see #canGetLong(String) */ public final long getLong(String field) { return m_table.getLong(m_cur, field); }
/** * Given a node id (a row number in the node table), get the value of * the node key field. * @param node the node id * @return the value of the node key field for the given node */ public long getKey(int node) { return m_nkey == null ? node : getNodeTable().getLong(node, m_nkey); }
/** * @see prefuse.data.Tuple#getLong(java.lang.String) */ public final long getLong(String field) { validityCheck(); return m_table.getLong(m_row, field); }
/** * @see prefuse.data.Tuple#getLong(int) */ public final long getLong(int col) { validityCheck(); return m_table.getLong(m_row, col); }
/** * Get the target node id (node table row number) for the given edge * id (edge table row number). * @param edge an edge id (edge table row number) * @return the target node id (node table row number) */ public int getTargetNode(int edge) { return getNodeIndex(getEdgeTable().getLong(edge, m_tkey)); }
/** * Get the source node id (node table row number) for the given edge * id (edge table row number). * @param edge an edge id (edge table row number) * @return the source node id (node table row number) */ public int getSourceNode(int edge) { return getNodeIndex(getEdgeTable().getLong(edge, m_skey)); }
/** * 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; }
long mintime = newtable.getLong(dstcol.getMinimumRow(), dstFieldName + "_fulltime");