lock method

void lock()

Implementation

void lock() {
  _locked = true;
}