DefaultRule(NewRule newRule) { this.key = newRule.key; this.id = newRule.id; this.name = newRule.name; this.severity = newRule.severity; this.type = newRule.type; this.description = newRule.description; this.internalKey = newRule.internalKey; this.status = newRule.status; Map<String, RuleParam> builder = new HashMap<>(); for (NewRuleParam newRuleParam : newRule.params.values()) { builder.put(newRuleParam.key, new DefaultRuleParam(newRuleParam)); } params = Collections.unmodifiableMap(builder); }
DefaultRule(NewRule newRule) { this.key = newRule.key; this.id = newRule.id; this.name = newRule.name; this.severity = newRule.severity; this.description = newRule.description; this.internalKey = newRule.internalKey; this.status = newRule.status; this.debtSubCharacteristic = newRule.debtSubCharacteristic; this.debtRemediationFunction = newRule.debtRemediationFunction; ImmutableMap.Builder<String, RuleParam> builder = ImmutableMap.builder(); for (NewRuleParam newRuleParam : newRule.params.values()) { builder.put(newRuleParam.key, new DefaultRuleParam(newRuleParam)); } params = builder.build(); }
DefaultRule(NewRule newRule) { this.key = newRule.key; this.id = newRule.id; this.name = newRule.name; this.severity = newRule.severity; this.type = newRule.type; this.description = newRule.description; this.internalKey = newRule.internalKey; this.status = newRule.status; Map<String, RuleParam> builder = new HashMap<>(); for (NewRuleParam newRuleParam : newRule.params.values()) { builder.put(newRuleParam.key, new DefaultRuleParam(newRuleParam)); } params = Collections.unmodifiableMap(builder); }