Advertisement
Guest User

Untitled

a guest
Oct 9th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class T {
  2.  
  3.     private disallowedStates = [];
  4.  
  5.     constructor(disallowedStates) {
  6.         this.disallowedStates = disallowedStates;
  7.     }
  8.  
  9.     aMethod(x){
  10.         assert(!disallowedStates.contains(x);
  11.         const y = this.doSomething(x);
  12.         const z = this.doAnotherThing(y);
  13.         return z;
  14.     },
  15.     doSomething(x){
  16.         // ...
  17.         return y;
  18.     },
  19.     doAnotherThing(y){
  20.         // ...
  21.         return z;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement