Savarese.Org

example.uniquery
Class Sum

java.lang.Object
  extended by example.uniquery.Sum

public final class Sum
extends java.lang.Object

A sample JavaBean that can be loaded into the uniquery example program. Sum adds two integers, A and B.


Constructor Summary
Sum()
          Creates a Sum JavaBean with all members initialized to zero.
 
Method Summary
 void add()
          Adds A and B and makes the result available via getSum().
 int getA()
          Returns the value of A.
 int getB()
          Returns the value of B.
 int getSum()
          Returns the sum of A and B produced by the last call of add().
 void setA(int a)
          Sets the value of A.
 void setB(int b)
          Sets the value of B.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sum

public Sum()
Creates a Sum JavaBean with all members initialized to zero.

Method Detail

setA

public void setA(int a)
Sets the value of A.

Parameters:
a - The new value of A.

getA

public int getA()
Returns the value of A.

Returns:
The value of A.

setB

public void setB(int b)
Sets the value of B.

Parameters:
b - The new value of B.

getB

public int getB()
Returns the value of B.

Returns:
The value of B.

add

public void add()
Adds A and B and makes the result available via getSum().


getSum

public int getSum()
Returns the sum of A and B produced by the last call of add().

Returns:
The sum of A and B produced by the last call of add().

Savarese.Org

Copyright © 2006 Daniel F. Savarese. All Rights Reserved.