/testability-explorer/src/test/java/com/google/test/metric/InnerEnumHolder.java
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 */ 16package com.google.test.metric; 17 18/** 19 * @author alexeagle@google.com (Alex Eagle) 20 */ 21public class InnerEnumHolder { 22 public enum NodeType { 23 ONE, 24 TWO, 25 THREE, 26 } 27 public NodeType nodetype = NodeType.ONE; 28 public InnerEnumHolder(NodeType nt) { 29 this.nodetype = nt; 30 } 31 public String toString() { 32 switch(this.nodetype) { 33 case ONE: 34 case TWO: 35 case THREE: 36 default: 37 return ""; 38 } 39 } 40}