code: public static int firstInt(Cursor cursor, boolean close) {
          int i = cursor.moveToFirst() ? cursor.getInt(0) : Integer.MIN_VALUE;
          close(cursor, close);
          return i;
      }
docs: Get the int value in the first row and column.
  
  @param close true to close the cursor or false to leave it open
  @return {@link Integer#MIN_VALUE} if the cursor is empty
  @since 2.5.0