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

Quick Search    Search Deep

org.metacosm.util
Class RandomAbsoluteModifier  view RandomAbsoluteModifier download RandomAbsoluteModifier.java

java.lang.Object
  extended byorg.metacosm.util.AbsoluteModifier
      extended byorg.metacosm.util.RandomAbsoluteModifier
All Implemented Interfaces:
org.metacosm.framework.persistence.Persistent, java.io.Serializable

public final class RandomAbsoluteModifier
extends AbsoluteModifier

A RandomAbsoluteModifier is an AbsoluteModifier which value is not fixed or known at Influence creation time. The value is determined at Influence applying time with a DistributionLaw.


Field Summary
private  org.metacosm.framework.random.DistributionLaw law
           
 
Fields inherited from class org.metacosm.util.AbsoluteModifier
MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY, priority
 
Constructor Summary
RandomAbsoluteModifier(org.metacosm.framework.random.DistributionLaw law)
           
RandomAbsoluteModifier(org.metacosm.framework.random.DistributionLaw law, int priority)
           
 
Method Summary
 java.lang.Object getValue()
          Should just be called once at Influence applying time.
 void load(java.io.InputStream is)
          Loads from the stream.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class org.metacosm.util.AbsoluteModifier
getPriority, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

law

private org.metacosm.framework.random.DistributionLaw law
Constructor Detail

RandomAbsoluteModifier

public RandomAbsoluteModifier(org.metacosm.framework.random.DistributionLaw law,
                              int priority)
                       throws java.lang.IllegalArgumentException

RandomAbsoluteModifier

public RandomAbsoluteModifier(org.metacosm.framework.random.DistributionLaw law)
                       throws java.lang.IllegalArgumentException
Method Detail

getValue

public java.lang.Object getValue()
Should just be called once at Influence applying time.

Overrides:
getValue in class AbsoluteModifier

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 AbsoluteModifier

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).

Overrides:
toString in class AbsoluteModifier