parse static method

CloseCode parse(
  1. int value
)

Implementation

static CloseCode parse(int value) {
  var index = codes.indexOf(value);
  return index < 0 ? CloseCode.reserved : CloseCode.values[index];
}