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

📄 abstractmemoryblock.java

📁 一个开源的组件
💻 JAVA
字号:
package org.xvolks.jnative.pointers.memory;

/**
 * $Id: AbstractMemoryBlock.java,v 1.3 2006/06/09 20:44:04 mdenty Exp $
 *
 * <p>New Memory blocks should extends this class</p>
 *
 * This software is released under the LGPL.
 * @author Created by Marc DENTY - (c) 2006 JNative project
 */
public abstract class AbstractMemoryBlock implements MemoryBlock {
	
	private Integer pointer;
	private int size;
	
	AbstractMemoryBlock(int size) {
		this.size = size;
	}
	
	
	/**
	 * Method getSize
	 * @return   the size of this memory block
	 * @exception   NullPointerException if the pointer is null
	 */
	public final int getSize() throws NullPointerException {
		return size;
	}
	
	
	/**
	 * Method getPointer
	 * @return   the pointer that addresses the memory block
	 */
	public final Integer getPointer() throws NullPointerException {
		return pointer;
	}
	
	protected void setPointer(Integer pointer) {
		if(pointer == null)
			size = 0;
		this.pointer = pointer;
	}
	
	protected void setSize(int size) {
		this.size = size;
	}
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -