org.apache.taglibs.random
Class RandomNum
java.lang.Object
|
+--org.apache.taglibs.random.RandomNum
- public class RandomNum
- extends java.lang.Object
The RandomNum will produce a variable set of random numbers.
- Version:
- 1.0
- Author:
- Rich Catlett
|
Method Summary |
void |
generateRandomObject()
generate the Random object that will be used for this random number
generator |
java.lang.Number |
getRandom()
get the random number, for use with the
<jsp:getProperty name="id" property="floatval"/> |
void |
setAlgorithm(java.lang.String value)
set the algorithm name |
void |
setProvider(java.lang.String value)
set the provider name |
void |
setRange(long low,
long up)
set the Range |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomNum
public RandomNum()
generateRandomObject
public final void generateRandomObject()
throws javax.servlet.jsp.JspException
- generate the Random object that will be used for this random number
generator
getRandom
public final java.lang.Number getRandom()
- get the random number, for use with the
<jsp:getProperty name="id" property="floatval"/>
- Returns:
- - randomly created float value
- Throws:
- - JspException if the range entered for the number generator is not
0-1
setRange
public final void setRange(long low,
long up)
- set the Range
- Parameters:
low - lower bound of the rangeup - upper bound of the range
setAlgorithm
public final void setAlgorithm(java.lang.String value)
- set the algorithm name
- Parameters:
value - name of the algorithm to use for a SecureRandom object
setProvider
public final void setProvider(java.lang.String value)
- set the provider name
- Parameters:
value - name of the package to check for the algorithm
Copyright ? 2000 Apache Software Foundation. All Rights Reserved.