Line | Hits | Source |
---|---|---|
1 | package net.sf.tourviewer.lib.ciclo; | |
2 | ||
3 | import java.util.Formatter; | |
4 | ||
5 | ||
6 | public abstract class AbstractBlock implements Block { | |
7 | ||
8 | private int[] data; | |
9 | ||
10 | public AbstractBlock(int[] data) | |
11 | 77216 | { |
12 | 77216 | this.data = data; |
13 | 77216 | } |
14 | ||
15 | public int[] getData() | |
16 | { | |
17 | 0 | return null; |
18 | } | |
19 | ||
20 | public String getDataString() | |
21 | { | |
22 | 0 | StringBuilder sb = new StringBuilder(40); |
23 | 0 | Formatter formatter = new Formatter(sb); |
24 | ||
25 | 0 | for (int i = 0; i < data.length; i++) { |
26 | 0 | formatter.format("%4H.", data[i]); |
27 | } | |
28 | 0 | return sb.toString(); |
29 | } | |
30 | ||
31 | public int getHex(int offset) | |
32 | { | |
33 | 128994 | return data[offset]; |
34 | } | |
35 | ||
36 | public int getHexL(int offset) | |
37 | { | |
38 | 22120 | return data[offset] & 0x00FF; |
39 | } | |
40 | ||
41 | public int getHexH(int offset) | |
42 | { | |
43 | 43616 | return (data[offset] & 0xFF00) >> 8; |
44 | } | |
45 | ||
46 | public int getDec(int offset) | |
47 | { | |
48 | 38 | return Integer.parseInt(Integer.toHexString(getHex(offset)) + ""); |
49 | } | |
50 | ||
51 | public int getDecH(int offset) | |
52 | { | |
53 | 1202 | return Integer.parseInt(Integer.toHexString(getHexH(offset)) + ""); |
54 | } | |
55 | ||
56 | public int getDecL(int offset) | |
57 | { | |
58 | 1202 | return Integer.parseInt(Integer.toHexString(getHexL(offset)) + ""); |
59 | } | |
60 | ||
61 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |