Package org.codehaus.groovy.runtime.powerassert

# Class ValueRecorder

java.lang.Object
org.codehaus.groovy.runtime.powerassert.ValueRecorder

public class ValueRecorder extends Object
Records values produced during evaluation of an assertion statement's truth expression.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ValueRecorder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Removes all values recorded for the current assertion evaluation.
  `List<Value>`
  `getValues()`
  Returns the recorded values in recording order.
  `Object`
  `record(Object value, int anchor)`
  Records a value at the supplied anchor column and returns it unchanged.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ValueRecorder

    public ValueRecorder()

- ## Method Details

  - ### clear

    public void clear()
    Removes all values recorded for the current assertion evaluation.

  - ### record

    public Object record(Object value, int anchor)
    Records a value at the supplied anchor column and returns it unchanged.
    Parameters:
      `value` - the value produced while evaluating the assertion
      `anchor` - the 1-based column in the normalized assertion text, or a non-positive value if the position is unknown
    Returns:
      `value`

  - ### getValues

    public List<Value> getValues()
    Returns the recorded values in recording order.
    Returns:
      the live list of recorded values