Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.metacosm.framework.random
Class TranslatedUniformDistributionLaw  view TranslatedUniformDistributionLaw download TranslatedUniformDistributionLaw.java

java.lang.Object
  extended byorg.metacosm.framework.random.UniformDistributionLaw
      extended byorg.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
           
 
Fields inherited from class org.metacosm.framework.random.UniformDistributionLaw
intMax, type
 
Constructor Summary
TranslatedUniformDistributionLaw(java.lang.Class type, long min, long max)
          Constructor for a translated uniform distribution law.
 
Method Summary
 void load(java.io.InputStream is)
          Loads from the stream.
 java.lang.Object nextValue()
           
 void save(java.io.OutputStream os)
          Saves on the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offset

private long offset
Constructor Detail

TranslatedUniformDistributionLaw

public TranslatedUniformDistributionLaw(java.lang.Class type,
                                        long min,
                                        long max)
                                 throws java.lang.IllegalArgumentException
Constructor for a translated uniform distribution law.

Method Detail

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