Skip to content

Instantly share code, notes, and snippets.

@srialdabaoth
Created May 26, 2013 10:46
Show Gist options
  • Select an option

  • Save srialdabaoth/5652407 to your computer and use it in GitHub Desktop.

Select an option

Save srialdabaoth/5652407 to your computer and use it in GitHub Desktop.
public static boolean codeExists(ArrayList subjectList, String userCode){
boolean exists = false;
for(int i=0; i < subjectList.size(); i++){
String iCode = ((Subject)subjectList.get(i)).getCode();
if(userCode.matches(iCode)){
exists = true;
}
}
return exists;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment