operator [] method

int operator [](
  1. dynamic other
)

Implementation

int operator [](other) {
  switch (other) {
    case 'mode':
      return mode;
    case 'want':
      return _want;
    case 'given':
      return _given;
    default:
      return 0;
  }
}