Mistři v programování na #hovnokod

Java #94

for (ComplectationItemTO complectation : previewFullTO.getItemComplectations()) {
            for (Map.Entry entry : complectation.getInstances().entrySet()) {
                if (entry.getKey().equals(SoundData.SOUND_COMPLECTATION_NAME)) {

                    SoundData soundData = getComplectationSoundData(complectation.getId(), previewFullTO);
                    soundsMap.put(complectation.getId(), soundData);
                }
            }
        }


 private SoundData getComplectationSoundData(Long complectatiomId, PreviewFullTO previewFullTO) {
        for (ComplectationItemTO complectationSound : previewFullTO.getItemComplectations()) {
            if (complectationSound.getId().equals(complectatiomId)) {
                for (Map.Entry entrySound : complectationSound.getInstances().entrySet()) {
                    if (entrySound.getKey().equals(SoundData.SOUND_LENGTH)) {
                        String soundLength = complectationSound.getInstances().get(SoundData.SOUND_LENGTH);
                        String soundData = complectationSound.getInstances().get(SoundData.SOUND_COMPLECTATION_NAME);
                        String productNumber = previewFullTO.getItemTO().getFeatureInstances().get("Product number");
                        String productRewritedName = previewFullTO.getItemTO().getProductTypeRewrited();
                        return new SoundData(soundData, productRewritedName, Long.valueOf(productNumber), soundLength);
                    }
                }
            }
        }
        return null;
    }

Anonymous,