private void createGroupCommitmentInternal(Commitment c) throws CommitmentAlreadyAddedException {
// CHECK IF COMMITMENT IS ALREADY IN INTERACTION STATE
for (Commitment actualC : allCommitments) {
// errore se commitment uguali E se creditori sono ENTRAMBI GROUP_ROLE
if (actualC.equals(c) && actualC.getCreditor().getType() == c.getCreditor().getType()) {
throw new CommitmentAlreadyAddedException(c);
}
}
allCommitments.add(c);
logger.trace("Commitment added, actual allCommitment status:\n"+printHashSet(allCommitments));