Line | Hits | Source |
---|---|---|
1 | package net.sf.tourviewer.ciclo; | |
2 | ||
3 | import java.util.Formatter; | |
4 | ||
5 | ||
6 | public abstract class AbstractRecord implements Record { | |
7 | ||
8 | private int[] data; | |
9 | ||
10 | 0 | public AbstractRecord(int[] data) |
11 | { | |
12 | 0 | this.data = data; |
13 | 0 | } |
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 | 0 | return data[offset]; |
34 | } | |
35 | ||
36 | public int getHexL(int offset) | |
37 | { | |
38 | 0 | return data[offset] & 0x00FF; |
39 | } | |
40 | ||
41 | public int getHexH(int offset) | |
42 | { | |
43 | 0 | return (data[offset] & 0xFF00) >> 8; |
44 | } | |
45 | ||
46 | public int getDec(int offset) | |
47 | { | |
48 | 0 | return Integer.parseInt(Integer.toHexString(getHex(offset)) + ""); |
49 | } | |
50 | ||
51 | public int getDecH(int offset) | |
52 | { | |
53 | 0 | return Integer.parseInt(Integer.toHexString(getHexH(offset)) + ""); |
54 | } | |
55 | ||
56 | public int getDecL(int offset) | |
57 | { | |
58 | 0 | 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. |