if(numInvitations > 24) {
throw new IllegalArgumentException("invitations.length > 24");
}
for(int i = 0; i < numInvitations; i++) {
final BBMInvitationRequest invite = invitations[i];
final String name = invite.getName();
if(name == null || name.length() == 0) {
throw new IllegalArgumentException("Invalid name: " + name);
}
final String pin = invite.getId();
if(! Util.isValidPIN(pin)) {
throw new IllegalArgumentException("Invalid PIN: " + pin);
}
}
}