Class ResultPiecewiseFunctionValue
java.lang.Object
com.amalgamasimulation.studies.result.ResultElement
com.amalgamasimulation.studies.result.ResultPiecewiseFunctionValue
- All Implemented Interfaces:
ResultValue
A result element representing a piecewise function value.
Extends
ResultElement and implements ResultValue to provide
piecewise function storage and display capabilities within a hierarchical result structure.
This class supports the storage of a PiecewiseFunction and formatting
configuration through DoubleFormats.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new ResultPiecewiseFunctionValue with the specified piecewise function. -
Method Summary
Modifier and TypeMethodDescriptionformat()Gets the current formatter function based on the configured format.format(DoubleFormats format) Sets the display format for numeric outputs from this piecewise function.Gets the current display format for numeric outputs.Sets the identifier for this element.value()Gets thePiecewiseFunctionvalue of this element.Methods inherited from class com.amalgamasimulation.studies.result.ResultElement
children, descendants, element, element, element, element, element, element, element, element, element, element, find, findByTags, findOrThrow, findOrThrow, getChildrenDoubleResults, getChildrenDoubleResults, getChildrenGroups, getChildrenGroups, getDateTimeOrThrow, getDateTimeOrThrow, getFunctionOrDefault, getFunctionOrThrow, getGroupOrThrow, getOrDefault, getOrThrow, getOrThrow, getStringOrThrow, getStringOrThrow, group, group, hasSiblingWithSameId, id, id, parent, path, root, setParent, summaryResultGroup, summaryResultGroup, tag, tagsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.amalgamasimulation.studies.result.ResultValue
path
-
Constructor Details
-
ResultPiecewiseFunctionValue
Constructs a new ResultPiecewiseFunctionValue with the specified piecewise function.- Parameters:
value- the piecewise function value (cannot be null)- Throws:
NullPointerException- if the value parameter is null
-
-
Method Details
-
value
Gets thePiecewiseFunctionvalue of this element.- Specified by:
valuein interfaceResultValue- Returns:
- the piecewise function value
-
format
Gets the current formatter function based on the configured format. The formatter will be used to format numeric outputs from the piecewise function. Default formatDoubleFormats.KMB.- Returns:
- a function that formats double values according to the current format
-
format
Sets the display format for numeric outputs from this piecewise function.- Parameters:
format- the format to use (cannot be null)- Returns:
- this element for method chaining
- Throws:
NullPointerException- if the format parameter is null
-
getFormat
Gets the current display format for numeric outputs. Default formatDoubleFormats.KMB.- Returns:
- the current format setting
-
id
Description copied from class:ResultElementSets the identifier for this element. The ID must be unique among siblings.- Overrides:
idin classResultElement- Parameters:
id- the unique identifier for this element- Returns:
- this element for method chaining
-