📄 bus.java
字号:
/*
* $Id: Bus.java,v 1.1 2003/11/25 11:41:30 epr Exp $
*/
package org.jnode.driver;
/**
* A software representation of a hardware bus that has
* devices connected to it.
*
* @see org.jnode.driver.Device
* @author Ewout Prangsma (epr@users.sourceforge.net)
*/
public abstract class Bus {
/** My parent, or null if I'm the system bus */
private final Bus parent;
/** The device that is connected to the parent bus and "provides" this bus. This can be null. */
private final Device parentDevice;
/**
* Package protected initializer for the system bus.
*/
Bus() {
this.parent = null;
this.parentDevice = null;
}
/**
* Initialize a new bus.
* @param parent
*/
public Bus(Bus parent) {
this.parent = parent;
this.parentDevice = null;
}
/**
* Initialize a new bus.
* @param parent
*/
public Bus(Device parent) {
this.parent = parent.getBus();
this.parentDevice = parent;
}
/**
* Gets the parent of this bus, or null if this is the system bus.
* @return The parent
*/
public final Bus getParent() {
return this.parent;
}
/**
* Gets the device that is connected to the parent bus
* and "provides" this bus.
* This can be null.
* @return The parent device
*/
public final Device getParentDevice() {
return this.parentDevice;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -