samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/BooleanInput.java
changeset 52 4257f4cf226b
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/BooleanInput.java	Sat Jun 14 09:52:45 2008 +0200
     1.3 @@ -0,0 +1,32 @@
     1.4 +/*
     1.5 + * BooleanInput.java
     1.6 + *
     1.7 + * Created on July 12, 2006, 2:31 PM
     1.8 + *
     1.9 + * To change this template, choose Tools | Template Manager
    1.10 + * and open the template in the editor.
    1.11 + */
    1.12 +
    1.13 +package org.netbeans.apifest.boolcircuit;
    1.14 +
    1.15 +/**
    1.16 + *
    1.17 + */
    1.18 +final class BooleanInput extends Input {
    1.19 +
    1.20 +    private boolean value;
    1.21 +    
    1.22 +    /** Creates a new instance of BooleanInput */
    1.23 +    public BooleanInput(boolean val) {
    1.24 +        value = val;
    1.25 +    }
    1.26 +
    1.27 +    public boolean getBooleanValue() {
    1.28 +        return value;
    1.29 +    }
    1.30 +
    1.31 +    public double getRealValue() {
    1.32 +        return value ? 1f : 0f; 
    1.33 +    }
    1.34 +    
    1.35 +}