Code example for CursorIndexOutOfBoundsException

0
    * helpers 
    */ 
 
    protected void checkPosition() { 
        if (-1 == pos || getCount() == pos) {
            throw new CursorIndexOutOfBoundsException(pos, getCount());
        } 
    } 
 
    /* 
    * inner classes 
    */ 
 
    private static abstract class Entry implements IndexEntry { 
        public final long id;
        public final int startPos;
        public final boolean isGroupHeader;
        public final boolean isUnread;
 
        protected Entry(long id, int startPos, boolean isGroupHeader, boolean isUnread) {
            this.id = id;