negate method

void negate()

Reassign the state value with the negated current value (true -> false)

Implementation

void negate() {
  setValue(!this.getValue());
}