samples/apifest1/day1/parsingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java
1.1 --- a/samples/apifest1/day1/parsingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:58:08 2008 +0200
1.2 +++ b/samples/apifest1/day1/parsingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:58:11 2008 +0200
1.3 @@ -22,10 +22,11 @@
1.4 // BEGIN: apifest.day1.parsingsolution.Circuit
1.5 /**
1.6 * Usage:
1.7 - * First method parse must be called with valid logical expression on input.
1.8 - * If it returns zero then it is possible to call method evaluate with array
1.9 - * of input values as parameter. Method evaluate can be invoked many time with
1.10 - * different input values.
1.11 + * First method parse must be called with valid logical expression on
1.12 + * input.
1.13 + * If it returns zero then it is possible to call method evaluate with
1.14 + * array of input values as parameter. Method evaluate can be invoked
1.15 + * many time with different input values.
1.16 * Method parse can be called anytime to change logical expression.
1.17 */
1.18 public class Circuit {
1.19 @@ -36,19 +37,21 @@
1.20 * Input values are represented by x and number starting from 1 eg.: x1
1.21 * AND, NOT, OR and brackets '(',')' can be used.
1.22 * Example of valid expression: x1 AND x2
1.23 - * @return 0 when input expression is validated and parsed. Return nonzero value otherwise.
1.24 + * @return 0 when input expression is validated and parsed.
1.25 + * Return nonzero value otherwise.
1.26 */
1.27 public int parse(String expression) {
1.28 return 0;
1.29 }
1.30
1.31 /** Evaluate logical expression
1.32 - * @param array of boolean input values. Size of array must correspond to number
1.33 - * of variables used in expression
1.34 - * If size of array is bigger then only first N values are used to evaluate expression.
1.35 - * Remaining values are ignored.
1.36 + * @param array of boolean input values. Size of array must
1.37 + * correspond to number of variables used in expression
1.38 + * If size of array is bigger then only first N values are used
1.39 + * to evaluate expression. Remaining values are ignored.
1.40 * If size of array is smaller then IllegalArgumentException is thrown.
1.41 - * If no expression is set by method parse then IllegalStateException is thrown.
1.42 + * If no expression is set by method parse then
1.43 + * IllegalStateException is thrown.
1.44 */
1.45 public boolean evaluate(boolean [] x) {
1.46 return true;