Code example for Pair

0
            if (mActionMode != null) {
                return false; 
            } 
 
            mItemsToCheck = new HashSet<Pair<Integer, Long>>();
            mItemsToCheck.add(new Pair<Integer, Long>(position, id));
            mActionMode = mActivity.startSupportActionMode(Controller.this);
            return true; 
        } 
    } 
 
    /** 
     * @see android.widget.AbsListView.MultiChoiceModeListener 
     */ 
    public static interface MultiChoiceModeListener extends ActionMode.Callback {
        /** 
         * @see android.widget.AbsListView.MultiChoiceModeListener#onItemCheckedStateChanged( 
         * android.view.ActionMode, int, long, boolean) 
         */ 
        public void onItemCheckedStateChanged(ActionMode mode,
                int position, long id, boolean checked);