Example usage for org.apache.commons.collections.primitives IntIterator next

List of usage examples for org.apache.commons.collections.primitives IntIterator next

Introduction

In this page you can find the example usage for org.apache.commons.collections.primitives IntIterator next.

Prototype

int next();

Source Link

Document

Returns the next element in me.

Usage

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 .  j  a va  2  s. c  om
        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 {//from  ww  w  .  j ava 2s.c om
        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);/*  ww w .  j a  v a2 s.  com*/
    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  ww  w. ja  v a  2s .c om*/
        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());
}