checkRosterPatternExceptionA<PK extends Object, VT extends EntityPattern<PK>> static method

void checkRosterPatternExceptionA<PK extends Object, VT extends EntityPattern<PK>>(
  1. Iterable<EntityPattern<Object>> values
)

Implementation

static void checkRosterPatternExceptionA<PK extends Object, VT extends EntityPattern<PK>>(Iterable<EntityPattern> values) {

    final log = Log(classLocation: RosterPattern<PK, VT>, functionLocation: 'checkRosterPatternExceptionA');

    final primaryKeyList = List.generate(values.length, (index) => values.elementAt(index).primaryKey);

    if(primaryKeyList.toSet().length == primaryKeyList.length) return;

    throw Failure(RosterPatternExceptionA(), log.monitor({
        'primary keys': primaryKeyList
    }));

}