killerbng icon

Can't find error

killerbng | PRO | 09/16/16 12:42:10 AM UTC | 0 ⭐ | 241 👁️ | Never ⏰ | []
Java |

590 B

|

None

|

0 👍

/

0 👎

if(checkExist(_id, temp)){
    if(Settings.DebugMode) Log.i(Settings.MAKE_DECK, "ID already exist, skipping ID# " + String.valueOf(_id));
}else{
    ArrayList<String> al = new ArrayList<>(
            Arrays.asList(
                    _id, _ru, _pro, _en, _audio, _type, _gender,
                    _category, _date, _active, _trouble,
                    _correct, _incorrect
            )
    );
    //Log.i("TEST", _id);
    temp.add(al);
    i++;
}
 
//
// checkExist()
//
public static boolean checkExist(String num, ArrayList<ArrayList<String>> temp){
    for(ArrayList<String> a : temp){
        if(a.get(0).equals(num)){
            return true;
        }
    }
    return false;
}

Comments