public static int findMethodInReminderList(ArrayList<Integer> values,int method){
  int index=values.indexOf(method);
  if (index == -1) {
    index=0;
  }
  return index;
}

public static int findMethodInReminderList ( ArrayList < Integer > values , int method ) { int index = values . indexOf ( method ) ; if ( index == - 1 ) { index = 0 ; } return index ; }
finds the index of the given method in the " methods " list . if the method isn ' t present ( perhaps because we don ' t think it ' s allowed for this calendar ) , we return zero ( the first item in the list ) . < p > with the current definitions , this effectively converts default and unsupported method types to alert .
