Example usage for android.database CursorIndexOutOfBoundsException CursorIndexOutOfBoundsException

List of usage examples for android.database CursorIndexOutOfBoundsException CursorIndexOutOfBoundsException

Introduction

In this page you can find the example usage for android.database CursorIndexOutOfBoundsException CursorIndexOutOfBoundsException.

Prototype

public CursorIndexOutOfBoundsException(String message) 

Source Link

Usage

From source file:com.eutectoid.dosomething.picker.GraphObjectCursor.java

public JSONObject getGraphObject() {
    if (pos < 0) {
        throw new CursorIndexOutOfBoundsException("Before first object.");
    }//from   w  ww  . j a  va2 s. co  m
    if (pos >= graphObjects.size()) {
        throw new CursorIndexOutOfBoundsException("After last object.");
    }
    return graphObjects.get(pos);
}

From source file:android.support.content.InMemoryCursor.java

private void checkValidPosition() {
    if (getPosition() < 0) {
        throw new CursorIndexOutOfBoundsException("Before first row.");
    }//  w  ww .  j  a  va2 s.co m
    if (getPosition() >= mRowCount) {
        throw new CursorIndexOutOfBoundsException("After last row.");
    }
}

From source file:android.support.content.InMemoryCursor.java

private void checkValidColumn(int column) {
    if (column < 0 || column >= mColumnNames.length) {
        throw new CursorIndexOutOfBoundsException(
                "Requested column: " + column + ", # of columns: " + mColumnNames.length);
    }//from  w ww  . j a  v a  2 s.c  om
}