O - Type of the object returned by the draw methodpublic static class Distribution.FrequencyAndObject<O> extends Object implements Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
FrequencyAndObject(double frequency,
O object)
Construct a new FrequencyAndObject instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getFrequency()
Retrieve the frequency (or probability) of this FrequencyAndObject.
|
O |
getObject()
Call the draw method of the generatingObject and return its result.
|
int |
hashCode() |
String |
toString() |
public FrequencyAndObject(double frequency,
O object)
frequency - double; the (not cumulative) frequency (or probability) of the generatingObjectobject - O; an objectpublic final double getFrequency()
public final O getObject()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.