/testability-explorer/src/test/java/com/google/test/metric/InnerEnumHolder.java

http://testability-explorer.googlecode.com/ · Java · 40 lines · 21 code · 1 blank · 18 comment · 0 complexity · 3faae3a34cf482120b9ba7b97bfaef38 MD5 · raw file

  1. /*
  2. * Copyright 2009 Google Inc.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.google.test.metric;
  17. /**
  18. * @author alexeagle@google.com (Alex Eagle)
  19. */
  20. public class InnerEnumHolder {
  21. public enum NodeType {
  22. ONE,
  23. TWO,
  24. THREE,
  25. }
  26. public NodeType nodetype = NodeType.ONE;
  27. public InnerEnumHolder(NodeType nt) {
  28. this.nodetype = nt;
  29. }
  30. public String toString() {
  31. switch(this.nodetype) {
  32. case ONE:
  33. case TWO:
  34. case THREE:
  35. default:
  36. return "";
  37. }
  38. }
  39. }