/** * Uses variator functionality to test selected variant on more terms. This * is used when variant is represented by more terms. Since usually only one * term per variant is used, only one multiple variant is allowed per * variator and should be placed as the last one * * @param variant * Number of variant (last variant in variator) * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @param terms * Array of terms used for variant * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryMultiTermVariant(int variant, Map<String, CSSProperty> properties, Map<String, Term<?>> values, Term<?>... terms) { this.terms = Arrays.asList(terms); // try inherit variant if (this.terms.size() == 1 && checkInherit(variant, this.terms.get(0), properties)) return true; return variant(variant, new IntegerRef(0), properties, values); }
/** * Uses variator functionality to test selected variant on more terms. This * is used when variant is represented by more terms. Since usually only one * term per variant is used, only one multiple variant is allowed per * variator and should be placed as the last one * * @param variant * Number of variant (last variant in variator) * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @param terms * Array of terms used for variant * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryMultiTermVariant(int variant, Map<String, CSSProperty> properties, Map<String, Term<?>> values, Term<?>... terms) { this.terms = Arrays.asList(terms); // try inherit variant if (this.terms.size() == 1 && checkInherit(variant, this.terms.get(0), properties)) return true; return variant(variant, new IntegerRef(0), properties, values); }
/** * Uses variator functionality to test selected variant on more terms. This * is used when variant is represented by more terms. Since usually only one * term per variant is used, only one multiple variant is allowed per * variator and should be placed as the last one * * @param variant * Number of variant (last variant in variator) * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @param terms * Array of terms used for variant * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryMultiTermVariant(int variant, Map<String, CSSProperty> properties, Map<String, Term<?>> values, Term<?>... terms) { this.terms = Arrays.asList(terms); // try inherit variant if (this.terms.size() == 1 && checkInherit(variant, this.terms.get(0), properties)) return true; return variant(variant, new IntegerRef(0), properties, values); }
for (IntegerRef i = new IntegerRef(0); i.get() < terms.size(); i.inc()) {
for (IntegerRef i = new IntegerRef(0); i.get() < terms.size(); i.inc()) {
for (IntegerRef i = new IntegerRef(0); i.get() < terms.size(); i.inc()) {
for (IntegerRef i = new IntegerRef(0); i.get() < terms.size(); i.inc()) {
/** * Uses variator functionality to test selected variant on term * * @param variant * Which variant will be tested * @param d * The declaration on which variant will be tested * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryOneTermVariant(int variant, Declaration d, Map<String, CSSProperty> properties, Map<String, Term<?>> values) { // only one term is allowed if (d.size() != 1) return false; // try inherit variant if (checkInherit(variant, d.get(0), properties)) return true; this.terms = new ArrayList<Term<?>>(); this.terms.add(d.get(0)); return variant(variant, new IntegerRef(0), properties, values); }
/** * Uses variator functionality to test selected variant on more terms. This * is used when variant is represented by more terms. Since usually only one * term per variant is used, only one multiple variant is allowed per * variator and should be placed as the last one * * @param variant * Number of variant (last variant in variator) * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @param terms * Array of terms used for variant * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryMultiTermVariant(int variant, Map<String, CSSProperty> properties, Map<String, Term<?>> values, Term<?>... terms) { this.terms = Arrays.asList(terms); // try inherit variant if (this.terms.size() == 1 && checkInherit(variant, this.terms.get(0), properties)) return true; return variant(variant, new IntegerRef(0), properties, values); }
/** * Uses variator functionality to test selected variant on term * * @param variant * Which variant will be tested * @param d * The declaration on which variant will be tested * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryOneTermVariant(int variant, Declaration d, Map<String, CSSProperty> properties, Map<String, Term<?>> values) { // only one term is allowed if (d.size() != 1) return false; // try inherit variant if (checkInherit(variant, d.get(0), properties)) return true; this.terms = new ArrayList<Term<?>>(); this.terms.add(d.get(0)); return variant(variant, new IntegerRef(0), properties, values); }
/** * Uses variator functionality to test selected variant on term * * @param variant * Which variant will be tested * @param d * The declaration on which variant will be tested * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryOneTermVariant(int variant, Declaration d, Map<String, CSSProperty> properties, Map<String, Term<?>> values) { // only one term is allowed if (d.size() != 1) return false; // try inherit variant if (checkInherit(variant, d.get(0), properties)) return true; this.terms = new ArrayList<Term<?>>(); this.terms.add(d.get(0)); return variant(variant, new IntegerRef(0), properties, values); }
/** * Uses variator functionality to test selected variant on term * * @param variant * Which variant will be tested * @param d * The declaration on which variant will be tested * @param properties * Properties map where to store property type * @param values * Values map where to store property value * @return <code>true</code> in case of success, <code>false</code> * otherwise */ public boolean tryOneTermVariant(int variant, Declaration d, Map<String, CSSProperty> properties, Map<String, Term<?>> values) { // only one term is allowed if (d.size() != 1) return false; // try inherit variant if (checkInherit(variant, d.get(0), properties)) return true; this.terms = new ArrayList<Term<?>>(); this.terms.add(d.get(0)); return variant(variant, new IntegerRef(0), properties, values); }