java.lang.Object
org.metacosm.framework.random.UniformDistributionLaw
org.metacosm.framework.random.TranslatedUniformDistributionLaw
- All Implemented Interfaces:
- DistributionLaw, org.metacosm.framework.persistence.Persistent, java.io.Serializable
- public class TranslatedUniformDistributionLaw
- extends UniformDistributionLaw
Translated uniform distribution law for basic numeric types
(Byte, Boolean, Double, Float, Int, Long, Short)
|
Field Summary |
private long |
offset
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
offset
private long offset
TranslatedUniformDistributionLaw
public TranslatedUniformDistributionLaw(java.lang.Class type,
long min,
long max)
throws java.lang.IllegalArgumentException
- Constructor for a translated uniform distribution law.
nextValue
public java.lang.Object nextValue()
- Specified by:
nextValue in interface DistributionLaw- Overrides:
nextValue in class UniformDistributionLaw
save
public void save(java.io.OutputStream os)
throws java.io.IOException
- Description copied from interface:
org.metacosm.framework.persistence.Persistent
- Saves on the stream.
- Specified by:
save in interface org.metacosm.framework.persistence.Persistent- Overrides:
save in class UniformDistributionLaw
load
public void load(java.io.InputStream is)
throws java.io.IOException
- Description copied from interface:
org.metacosm.framework.persistence.Persistent
- Loads from the stream.
- Specified by:
load in interface org.metacosm.framework.persistence.Persistent- Overrides:
load in class UniformDistributionLaw