diff --git a/adaa.analytics.rules/build.gradle b/adaa.analytics.rules/build.gradle index c3562583..acc7b923 100644 --- a/adaa.analytics.rules/build.gradle +++ b/adaa.analytics.rules/build.gradle @@ -27,7 +27,7 @@ codeQuality { } sourceCompatibility = 1.8 -version = '1.7.4' +version = '1.7.5' jar { diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/Knowledge.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/Knowledge.java index 108a3369..a555fb4b 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/Knowledge.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/Knowledge.java @@ -138,13 +138,17 @@ public class Knowledge implements Serializable { /** Gets {@link #preferredConditionsPerRule}. */ public int getPreferredConditionsPerRule() { return preferredConditionsPerRule; } - /** Sets {@link #preferredConditionsPerRule}. */ - public void setPreferredConditionsPerRule(int preferredConditionsPerRule) { this.preferredConditionsPerRule = preferredConditionsPerRule; } + /** Sets {@link #preferredConditionsPerRule}. The value of 0 is translated to the infinity.*/ + public void setPreferredConditionsPerRule(int v) { + this.preferredConditionsPerRule = (v == 0) ? Integer.MAX_VALUE : v; + } /** Gets {@link #preferredAttributesPerRule}. */ public int getPreferredAttributesPerRule() { return preferredAttributesPerRule; } - /** Sets {@link #preferredAttributesPerRule}. */ - public void setPreferredAttributesPerRule(int preferredAttributesPerRule) { this.preferredAttributesPerRule = preferredAttributesPerRule; } + /** Sets {@link #preferredAttributesPerRule}. The value of 0 is translated to the infinity.*/ + public void setPreferredAttributesPerRule(int v) { + this.preferredAttributesPerRule = (v == 0) ? Integer.MAX_VALUE : v; + } /** * Initializes knowledge from collections of initial rules, preferred/forbidden conditions and attributes.