public ValidationData ruleSync ( List < ValidationRule > rules ) { List < ValidationRule > ruleList = new ArrayList <> ( ) ; rules . forEach ( rule -> { ValidationRule existRule = this . getExistRule ( rule ) ; ruleList . add ( existRule != null ? existRule : rule ) ; } ) ; this . validationRules . removeAll ( ruleList ) ; this . tempRules . addAll ( this . validationRules ) ; this . validationRules = ruleList ; this . validationRules . sort ( new RuleSorter ( ) ) ; return this ; }
Rule sync validation data .