replicate method

LogicValue replicate(
  1. int multiplier
)

Returns new LogicValue replicated multiplier times.

An exception will be thrown in case the multiplier is <1.

Implementation

LogicValue replicate(int multiplier) {
  if (multiplier < 1) {
    throw InvalidMultiplierException(multiplier);
  }

  return LogicValue.ofIterable(List.filled(multiplier, this));
}