com.threerings.probs
Class ColorFunctionVariable.Fixed

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.probs.ColorFunctionVariable
          extended by com.threerings.probs.ColorFunctionVariable.Fixed
All Implemented Interfaces:
Exportable, com.threerings.io.Streamable, Copyable, Cloneable
Enclosing class:
ColorFunctionVariable

public static class ColorFunctionVariable.Fixed
extends ColorFunctionVariable

Simply returns the same function.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.probs.ColorFunctionVariable
ColorFunctionVariable.Fixed, ColorFunctionVariable.VariableConstant, ColorFunctionVariable.VariableLinear
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
com.threerings.io.Streamable.Closure
 
Field Summary
 ColorFunction function
          The function to return.
 
Constructor Summary
ColorFunctionVariable.Fixed()
          No-arg constructor for deserialization, etc.
ColorFunctionVariable.Fixed(ColorFunction function)
          Creates a fixed variable with the specified function.
 
Method Summary
 ColorFunction getValue(ColorFunction result)
          Computes a sample value according to the variable's distribution.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

function

@Editable(mode="%INHERIT%")
public ColorFunction function
The function to return.

Constructor Detail

ColorFunctionVariable.Fixed

public ColorFunctionVariable.Fixed(ColorFunction function)
Creates a fixed variable with the specified function.


ColorFunctionVariable.Fixed

public ColorFunctionVariable.Fixed()
No-arg constructor for deserialization, etc.

Method Detail

getValue

public ColorFunction getValue(ColorFunction result)
Description copied from class: ColorFunctionVariable
Computes a sample value according to the variable's distribution.

Specified by:
getValue in class ColorFunctionVariable
Parameters:
result - an object to repopulate, if possible.
Returns:
either the result object, if it could be repopulated, or a new object containing the result.


Copyright © 2011. All Rights Reserved.