samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/OperationInput.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/OperationInput.java	Sat Jun 14 09:52:45 2008 +0200
     1.3 @@ -0,0 +1,30 @@
     1.4 +/*
     1.5 + * OperationInput.java
     1.6 + *
     1.7 + * Created on July 12, 2006, 2:32 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 OperationInput extends Input {
    1.19 +    private Operation operation;
    1.20 +    /** Creates a new instance of OperationInput */
    1.21 +    public OperationInput(Operation oper) {
    1.22 +        operation = oper;
    1.23 +    }
    1.24 +
    1.25 +    public boolean getBooleanValue() {
    1.26 +        return operation.performBooleanOperation();
    1.27 +    }
    1.28 +
    1.29 +    public double getRealValue() {
    1.30 +        return operation.performRealOperation();
    1.31 +    }
    1.32 +    
    1.33 +}