com.bristle.javalib.bean
Class MathBean

java.lang.Object
  extended by com.bristle.javalib.bean.MathBean

public class MathBean
extends Object

This class encapsulates mathematical functions in a Java Bean so they can be accessed as beans from JSP/JSTL EL expressions. Usage: - The typical scenario for using this class is:

<jsp:useBean id='myMathBean' class='com.bristle.javalib.bean.MathBean' /> <img src='getImage?name='image1.jpg&forceReload=${myMathBean.randomInt}'> Assumptions: Effects: - None. Anticipated Changes: Notes: Implementation Notes: Portability Issues: Revision History: $Log$


Field Summary
private  int m_intMaxRandomInt
           
private  int m_intMinRandomInt
           
private static long serialVersionUID
          This number identifies the version of the class definition, used for serialized instances.
 
Constructor Summary
MathBean()
           
 
Method Summary
 int getMaxRandomInt()
          Get the max random int.
 int getMinRandomInt()
          Get the min random int.
 int getRandomInt()
          Get a random int.
 void setMaxRandomInt(int intVal)
          Set the max random int.
 void setMinRandomInt(int intVal)
          Set the min random int.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_intMinRandomInt

private int m_intMinRandomInt

m_intMaxRandomInt

private int m_intMaxRandomInt

serialVersionUID

private static final long serialVersionUID
This number identifies the version of the class definition, used for serialized instances. Be sure to increment it when adding/modifying instance variable definitions or making any other change to the class definition. Omitting this declaration causes a compiler warning for any class that implements java.io.Serializable.

See Also:
Constant Field Values
Constructor Detail

MathBean

public MathBean()
Method Detail

getRandomInt

public int getRandomInt()
Get a random int.

Returns:
The random int

getMinRandomInt

public int getMinRandomInt()
Get the min random int.


setMinRandomInt

public void setMinRandomInt(int intVal)
Set the min random int.


getMaxRandomInt

public int getMaxRandomInt()
Get the max random int.


setMaxRandomInt

public void setMaxRandomInt(int intVal)
Set the max random int.