class SnarePatternSelector {

    public QueueState setSelectedPatterns(Map<ProgressionUnit.ProgressionType, SnarePattern> typeToSelectedPatten, QueueState queueState) {

        for (ProgressionUnit pUnit : queueState.getStructure()) {
            SnarePattern snarePattern = typeToSelectedPatten.get(pUnit.getType());

            for (int i = 0; i < pUnit.getProgressionUnitBars().size(); i++) {
                pUnit.getProgressionUnitBars().get(i).setSnarePattern(snarePattern);
            }
        }

        return queueState;
    }

}