Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package ca.bcit.cst.comp2526.assign4.a00752818;
  7.  
  8. /**
  9. *
  10. * @author User
  11. */
  12. public class Operation {
  13.  
  14.  
  15. /**
  16. *
  17. * @author User
  18. */
  19.  
  20. private static enum OperationCategory
  21. {
  22. GATES,
  23. NOTGATES,
  24. }
  25.  
  26. public static enum OperationType
  27. {
  28. AND(OperationCategory.GATES),
  29. OR(OperationCategory.GATES),
  30. XOR(OperationCategory.GATES),
  31. NOT(OperationCategory.NOTGATES),
  32. NAND(OperationCategory.NOTGATES),
  33. NOR(OperationCategory.NOTGATES),
  34. XNOR(OperationCategory.NOTGATES);
  35.  
  36. private final OperationCategory category;
  37. private OperationType(final OperationCategory cat)
  38. {
  39. if(cat == null)
  40. {
  41. throw new IllegalArgumentException("category cannot be null");
  42. }
  43.  
  44. category = cat;
  45. }
  46.  
  47. }
  48.  
  49.  
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement