Android CursorIndexOutOfBoundsException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android CursorIndexOutOfBoundsException class.

This code example shows how to use the following methods:
         *  values 
         * @return this builder to support chaining 
         */ 
        public RowBuilder add(Object columnValue) {
            if (index == endIndex) {
                throw new CursorIndexOutOfBoundsException(
                        "No more columns left."); 
            } 
 
            data[index++] = columnValue;
            return this;
        } 
    } 
 
    public void set(int column, Object value) {
        if (column < 0 || column >= columnCount) {
            throw new CursorIndexOutOfBoundsException("Requested column: "
                    + column + ", # of columns: " +  columnCount);
        } 
        if (mPos < 0) {
5
CodeRank
This code example shows how to use the following methods:
         *  values 
         * @return this builder to support chaining 
         */ 
        public RowBuilder add(Object columnValue) {
            if (index == endIndex) {
                throw new CursorIndexOutOfBoundsException(
                        "No more columns left."); 
            } 
 
            data[index++] = columnValue;
            return this;
        } 
    } 
 
    // AbstractCursor implementation. 
 
    public int getCount() { 
        return rowCount;
    } 
 
5
CodeRank
This code example shows how to use the following methods:
    public int getInt(int column) {
        switch (column) {
            case COLUMN_INDEX_ID:
                return getPosition();
            default: 
                throw new CursorIndexOutOfBoundsException("Requested column " + column
                        + " of " + COLUMNS.length);
        } 
    } 
 
    @Override 
    public String getString(int column) {
        switch (column) {
            case COLUMN_INDEX_ID:
                return String.valueOf(getPosition());
            case COLUMN_INDEX_TEXT1:
                return get().getSuggestionText1(); 
            case COLUMN_INDEX_TEXT2:
                return get().getSuggestionText2(); 
            case COLUMN_INDEX_TEXT2_URL:
5
CodeRank
This code example shows how to use the following methods:
     */ 
    private Object get(int column)
    { 
        if (column < 0 || column >= columnCount)
        { 
            throw new CursorIndexOutOfBoundsException("Requested column: " + column + ", # of columns: " + columnCount);
        } 
        if (mPos < 0)
        { 
            throw new CursorIndexOutOfBoundsException("Before first row.");
        } 
        if (mPos >= rowCount)
        { 
            throw new CursorIndexOutOfBoundsException("After last row.");
        } 
        return data[mPos * columnCount + column];
    } 
     
    /** 
     * Adds a new row to the end and returns a builder for that row. Not safe 
3
CodeRank
This code example shows how to use the following methods:
    /** 
     * Gets value at the given column for the current row. 
     */ 
    private Object get(int column) {
        if (column < 0 || column >= columnCount) {
            throw new CursorIndexOutOfBoundsException("Requested column: "
                    + column + ", # of columns: " +  columnCount);
        } 
        if (mPos < 0) {
            throw new CursorIndexOutOfBoundsException("Before first row.");
        } 
        if (mPos >= rowCount) {
            throw new CursorIndexOutOfBoundsException("After last row.");
        } 
        return data[mPos * columnCount + column];
    } 
 
    /** 
     * Adds a new row to the end and returns a builder for that row. Not safe 
     * for concurrent use. 
3
CodeRank
This code example shows how to use the following methods:
                case COLUMN_INDEX_SHORTCUT_ID:
                    return get().getShortcutId(); 
                case COLUMN_INDEX_SPINNER_WHILE_REFRESHING:
                    return String.valueOf(get().isSpinnerWhileRefreshing());
                default: 
                    throw new CursorIndexOutOfBoundsException("Requested column " + column
                            + " of " + COLUMNS.length);
            } 
        } else { 
            return getExtra(column);
        } 
    } 
 
    @Override 
    public long getLong(int column) {
        try { 
            return Long.valueOf(getString(column));
        } catch (NumberFormatException e) {
            return 0; 
        } 
4
CodeRank
This code example shows how to use the following methods:
    public int getInt(int column) {
        switch (column) {
            case COLUMN_INDEX_ID:
                return getPosition();
            default: 
                throw new CursorIndexOutOfBoundsException("Requested column " + column
                        + " of " + COLUMNS.length);
        } 
    } 
 
    @Override 
    public String getString(int column) {
        switch (column) {
            case COLUMN_INDEX_ID:
                return String.valueOf(getPosition());
            case COLUMN_INDEX_TEXT1:
                return get().getSuggestionText1(); 
            case COLUMN_INDEX_TEXT2:
                return get().getSuggestionText2(); 
            case COLUMN_INDEX_TEXT2_URL:
4
CodeRank
This code example shows how to use the following methods:
    /** 
     * Gets value at the given column for the current row. 
     */ 
    private Object get(int column) {
        if (column < 0 || column >= columnCount) {
            throw new CursorIndexOutOfBoundsException("Requested column: "
                    + column + ", # of columns: " +  columnCount);
        } 
        if (mPos < 0) {
            throw new CursorIndexOutOfBoundsException("Before first row.");
        } 
        if (mPos >= rowCount) {
            throw new CursorIndexOutOfBoundsException("After last row.");
        } 
        return data[mPos * columnCount + column];
    } 
 
    /** 
     * Adds a new row to the end and returns a builder for that row. Not safe 
     * for concurrent use. 
3
CodeRank
This code example shows how to use the following methods:
    /** 
     * Gets value at the given column for the current row. 
     */ 
    private Object get(int column) {
        if (column < 0 || column >= columnCount) {
            throw new CursorIndexOutOfBoundsException("Requested column: "
                    + column + ", # of columns: " +  columnCount);
        } 
        if (mPos < 0) {
            throw new CursorIndexOutOfBoundsException("Before first row.");
        } 
        if (mPos >= rowCount) {
            throw new CursorIndexOutOfBoundsException("After last row.");
        } 
        return data[mPos * columnCount + column];
    } 
 
    /** 
     * Adds a new row to the end and returns a builder for that row. Not safe 
     * for concurrent use. 
3
CodeRank
This code example shows how to use the following methods:
			case 7: 
				return issueList.get(idx).isVoted();
			case 8: 
				return issueList.get(idx).getVotes();
			default: 
				throw new CursorIndexOutOfBoundsException("No column index of:  " + column);
		} 
	} 
	 
	@Override 
	public float getFloat(int column)
	{ 
		return (Float) getValue(column);
	} 
 
	@Override 
	public int getInt(int column)
	{ 
		return (Integer) getValue(column);
	} 
3
CodeRank

Related Android CursorIndexOutOfBoundsException Questions & Answers:

See Code Examples for Android CursorIndexOutOfBoundsException Methods: