validate method

void validate ()

Implementation

void validate() {
  if (type == null || type < 0) {
    throw Exception('type must be defined and may not be < 0');
  }
  if (flags == null || flags < 0) {
    throw Exception('flags must be defined and may not be < 0');
  }
}