Combine if/else block with switch for getOperatorList.
Merge pull request #3940 from brendandahl/operator-cleanup

Combine if/else block with switch for getOperatorList.