Coverage report

  %line %branch
net.sf.infrared.web.treecontrolmodel.AggrApiJspTreeNode
0% 
0% 

 1  
 /*
 2  
  *
 3  
  * Copyright 2005 Tavant Technologies and Contributors
 4  
  * 
 5  
  * Licensed under the Apache License, Version 2.0 (the "License")
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  *
 9  
  *     http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  *
 17  
  *
 18  
  *
 19  
  * Original Author:  kamal.govindraj (Tavant Technologies)
 20  
  * Contributor(s):   prashant.nair;
 21  
  *
 22  
  */
 23  
 package net.sf.infrared.web.treecontrolmodel;
 24  
 
 25  
 import net.sf.jsptree.component.JSPTreeNode;
 26  
 import net.sf.infrared.base.model.AggregateExecutionTime;
 27  
 import net.sf.infrared.web.treecontrolmodel.NodeToStringConverter;
 28  
 
 29  
 import java.util.Collections;
 30  
 import java.util.HashMap;
 31  
 import java.util.Map;
 32  
 
 33  
 /**
 34  
  *  Represents the data in the node. This node is used to display the AggregateApiTime
 35  
  */
 36  
 public class AggrApiJspTreeNode implements JSPTreeNode {
 37  
 	private AggregateExecutionTime apiTime;
 38  
 
 39  
 	private NodeToStringConverter nodeToStringConverter;
 40  
 
 41  
 	private String uniqueKey;
 42  
 
 43  
 	private Map map;
 44  
 
 45  0
 	static int keyCounter = 0;
 46  
 
 47  
 	public AggrApiJspTreeNode(AggregateExecutionTime apiTime,
 48  0
 													NodeToStringConverter nodeToStringConverter) {
 49  0
 		this.apiTime = apiTime;
 50  0
 		uniqueKey = Integer.toString(keyCounter++);
 51  0
 		map = new HashMap();
 52  0
 		this.nodeToStringConverter = nodeToStringConverter;
 53  0
 	}
 54  
 
 55  
 	public AggregateExecutionTime getAggregateApiTime() {
 56  0
 		return apiTime;
 57  
 	}
 58  
 
 59  
 	public String getId() {
 60  0
 		return uniqueKey;
 61  
 	}
 62  
 
 63  
 	public String getHref() {
 64  0
 		return nodeToStringConverter.getHref(apiTime);
 65  
 	}
 66  
 
 67  
 	public boolean isContextRelative() {
 68  0
 		return nodeToStringConverter.isContextRelative();
 69  
 	}
 70  
 
 71  
 	public String getTarget() {
 72  0
 		return "";
 73  
 	}
 74  
 
 75  
 	public String getLabel() {
 76  0
 		return nodeToStringConverter.toString(apiTime);
 77  
 	}
 78  
 
 79  
 	public String getSkinName() {
 80  0
 		return null;
 81  
 	}
 82  
 
 83  
 	public Map getValues() {
 84  0
 		return Collections.unmodifiableMap(map);
 85  
 	}
 86  
 
 87  
 	public Object clone() throws CloneNotSupportedException {
 88  0
 		return super.clone();
 89  
 	}
 90  
 
 91  
 	public boolean equals(Object p_obj) {
 92  0
 		if (!(p_obj instanceof AggrApiJspTreeNode)) {
 93  0
 			return false;
 94  
 		}
 95  0
 		AggrApiJspTreeNode a_treeNode = (AggrApiJspTreeNode) p_obj;
 96  0
 		return uniqueKey.equals(a_treeNode.getId());
 97  
 	}
 98  
 
 99  
 	public int hashCode() {
 100  0
 		return 37 * uniqueKey.hashCode();
 101  
 	}
 102  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.