Class ResultStringValue

java.lang.Object
com.amalgamasimulation.studies.result.ResultElement
com.amalgamasimulation.studies.result.ResultStringValue
All Implemented Interfaces:
ResultValue

public class ResultStringValue extends ResultElement implements ResultValue
A result element representing a string value. Extends ResultElement and implements ResultValue to provide string value functionality within a hierarchical result structure.

This class provides methods to get and set the string value.

  • Constructor Details

    • ResultStringValue

      public ResultStringValue(String value)
      Constructs a new ResultStringValue with the specified string value.
      Parameters:
      value - the string value to store (cannot be null)
      Throws:
      NullPointerException - if the value parameter is null
  • Method Details

    • value

      public String value()
      Gets the string value of this element.
      Specified by:
      value in interface ResultValue
      Returns:
      the string value (may be null)
    • id

      public ResultStringValue id(String id)
      Description copied from class: ResultElement
      Sets the identifier for this element. The ID must be unique among siblings.
      Overrides:
      id in class ResultElement
      Parameters:
      id - the unique identifier for this element
      Returns:
      this element for method chaining