|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.flexgen.util.Option<T>
T - The type of the option this class represents.public class Option<T>
Class representing an option that can be randomly selected from among a number of options with different probabilities.
| Constructor Summary | |
|---|---|
Option(T option,
long startRange,
long endRange)
Construct an option. |
|
| Method Summary | |
|---|---|
T |
getOption()
Get the option represented by this class. |
boolean |
withinRange(long value)
Determine whether or not this option is within range of a specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Option(T option,
long startRange,
long endRange)
option - The option represented by the class. Cannot be null.startRange - The lower bound of values that will result in this option being selected. Must be
greater than or equal to 0.endRange - The upper bound of values that will result in this option being selected. Must be
greater than or equal to startRange.| Method Detail |
|---|
public T getOption()
public boolean withinRange(long value)
value - The value to check.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2009 - Jeffrey J. Weston <jjweston@gmail.com>
All rights reserved. Use is subject to license terms.