List of usage examples for org.apache.commons.collections.primitives IntIterator hasNext
boolean hasNext();
true
iff I have more elements. From source file:dbs_project.storage.impl.Tabla.java
@Override public void deleteRows(IntIterator rowIDs) throws NoSuchRowException { while (rowIDs.hasNext() == true) { Fil.remove();//from w w w .jav a 2 s . c o m rowIDs.next(); } }
From source file:dbs_project.storage.impl.Tables.java
@Override public void dropColumns(IntIterator columnIds) throws NoSuchColumnException { Object[] values = tablaEsquema.values().toArray(); do {/* ww w . j a v a 2 s.c o m*/ tablaEsquema.remove(columnIds.hashCode()); columnIds.next(); } while (columnIds.hasNext()); throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }
From source file:dbs_project.storage.impl.Tables.java
@Override public void updateColumns(IntIterator columnIDs, ColumnCursor updateColumns) throws SchemaMismatchException, NoSuchColumnException { NoSuchColumn(columnIDs);/* w w w . j a v a2 s.c o m*/ Object[] values = tablaEsquema.values().toArray(); Columns columna = (Columns) values[0]; ColumnCursors columna2 = (ColumnCursors) updateColumns; do { if (columna.getMetaData().getRowCount() != updateColumns.getMetaData().getRowCount()) { throw new SchemaMismatchException("La columna no coincide con el numero de filas"); } tablaEsquema.put(columnIDs.hashCode(), columna2.getElement()); columna2.next(); columnIDs.next(); } while (columnIDs.hasNext()); }
From source file:dbs_project.storage.impl.Tables.java
@Override public void updateRows(IntIterator rowIDs, RowCursor newRows) throws SchemaMismatchException, NoSuchRowException { RowCursors row1 = (RowCursors) newRows; SchemaMismatchRow(row1.getMetaData().getColumnCount()); Object[] values = tablaEsquema.values().toArray(); int indice = 0; do {/*from w w w . j a v a2s . c o m*/ for (Object i : values) { Columns columna = (Columns) i; try { DoublyLinkedList lista = (DoublyLinkedList) columna.getList(); lista.goToPos(rowIDs.hashCode()); lista.setElement(row1.getMetaData().getColumnMetaData(indice)); } catch (ClassCastException e) { LinkedList lista = (LinkedList) columna.getList(); lista.goToPos(rowIDs.hashCode()); lista.setElement(row1.getElement().getMetaData()); } indice++; } rowIDs.next(); row1.next(); } while (rowIDs.hasNext()); }