⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bus.java

📁 纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统
💻 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 + -