EMMA Coverage Report (generated Sat Jun 02 16:47:50 EDT 2012)
[all classes][net.sf.madmap]

COVERAGE SUMMARY FOR SOURCE FILE [HprofHeapElement.java]

nameclass, %method, %block, %line, %
HprofHeapElement.java100% (1/1)100% (4/4)93%  (26/28)88%  (7/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HprofHeapElement100% (1/1)100% (4/4)93%  (26/28)88%  (7/8)
equals (Object): boolean 100% (1/1)87%  (13/15)67%  (2/3)
HprofHeapElement (long): void 100% (1/1)100% (6/6)100% (3/3)
addr (): long 100% (1/1)100% (3/3)100% (1/1)
hashCode (): int 100% (1/1)100% (4/4)100% (1/1)

1/*
2 * Copyright 2008 Eric Caspole
3 * 
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
5 * file except in compliance with the License. You may obtain a copy of the License at
6 * 
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * 
9 * Unless required by applicable law or agreed to in writing, software distributed under
10 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
11 * KIND, either express or implied. See the License for the specific language governing
12 * permissions and limitations under the License.
13 */
14 package net.sf.madmap;
15 
16import java.util.*;
17 
18/**
19 * HprofHeapElement is the base class for everything in the heap.
20 * 
21 * @author ecaspole
22 *  
23 */
24public class HprofHeapElement extends HprofData {
25  protected long          _objectaddr;
26 
27  public HprofHeapElement( long addr ) {
28    _objectaddr = addr;
29  }
30 
31  public long addr() { return _objectaddr; }
32  public boolean equals(Object that) { 
33    if (that != null) {
34      return ((HprofHeapElement)that).addr() == this.addr();
35    }
36    return false;
37  }
38  public int hashCode() { return (int)addr(); }  
39}

[all classes][net.sf.madmap]
EMMA 2.0.5312 (C) Vladimir Roubtsov