Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
InterruptLine |
|
| 1.0;1 |
1 | /* |
|
2 | * InterruptLine.java |
|
3 | * |
|
4 | * This file is part of JavaGear. |
|
5 | * |
|
6 | * JavaGear is free software; you can redistribute it and/or modify |
|
7 | * it under the terms of the GNU General Public License as published by |
|
8 | * the Free Software Foundation; either version 2 of the License, or |
|
9 | * (at your option) any later version. |
|
10 | * |
|
11 | * JavaGear is distributed in the hope that it will be useful, |
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 | * GNU General Public License for more details. |
|
15 | * |
|
16 | * You should have received a copy of the GNU General Public License |
|
17 | * along with JavaGear; if not, write to the Free Software |
|
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
19 | */ |
|
20 | ||
21 | package uk.co.javagear; |
|
22 | ||
23 | /** |
|
24 | * Virtual Z80 interrupt line. |
|
25 | * |
|
26 | * @author Copyright (C) 2002 Chris White |
|
27 | * @version 6th March 2002 |
|
28 | * @see "JavaGear Final Project Report" |
|
29 | */ |
|
30 | public final class InterruptLine { |
|
31 | ||
32 | /** |
|
33 | * Status of interrupt line. |
|
34 | */ |
|
35 | private boolean line; |
|
36 | ||
37 | ||
38 | /** |
|
39 | * InterruptLine constructor. |
|
40 | * Line status defaults to <code>false</code>. |
|
41 | */ |
|
42 | 0 | public InterruptLine() { |
43 | 0 | line = false; |
44 | 0 | } |
45 | ||
46 | ||
47 | /** |
|
48 | * Set the interrupt line. |
|
49 | * |
|
50 | * @param b <code>true</code> asserts the line. <code>false</code> clears the line. |
|
51 | */ |
|
52 | public void setLine(boolean b) { |
|
53 | 0 | line = b; |
54 | 0 | } |
55 | ||
56 | ||
57 | /** |
|
58 | * Gets the status of the interrupt line. |
|
59 | * |
|
60 | * @return if <code>true</code> the line is asserted, otherwise the line is clear. |
|
61 | */ |
|
62 | public boolean getLine() { |
|
63 | 0 | return line; |
64 | } |
|
65 | ||
66 | } |