samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/VariableInput.java
Adding samples from API fest to the repository, including pieces of their code in the document, not just links
4 * Created on July 13, 2006, 3:02 PM
6 * To change this template, choose Tools | Template Manager
7 * and open the template in the editor.
10 package org.netbeans.apifest.boolcircuit;
16 public final class VariableInput extends Input {
20 /** Creates a new instance of VariableInput */
25 public void setBooleanValue(boolean bool) {
26 value = bool ? 1d : 0d;
29 public boolean getBooleanValue() {
33 public double getRealValue() {
37 public void setRealValue(double real) throws IllegalArgumentException {
38 if (real < 0d || real > 1d) {
39 throw new IllegalArgumentException();