boundedobj.java

来自「和YACC一样」· Java 代码 · 共 46 行

JAVA
46
字号
/*File:	 BoundedObj.javaAuthor:  zerksis d. umrigar (zdu@acm.org)Copyright (C) 1997 Zerksis D. UmrigarLast Update Time-stamp: "97/07/26 20:32:39 zdu"This code is distributed under the terms of the GNU General Public License.See the file COPYING with this distribution, or		http://www.fsf.org/copyleft/gpl.htmlTHERE IS ABSOLUTELY NO WARRANTY FOR THIS PROGRAM.*/package zdu.zydebug;import java.awt.Rectangle;class BoundedObj {  BoundedObj(Rectangle bounds, Object obj) {    this.bounds= bounds;    this.obj= obj;  }  boolean isInside(int x, int y) {    return bounds.inside(x, y);  }  Object getObject() {    return obj;  }  Rectangle getBounds() {    return bounds;  }  public String toString() {    return super.toString() + "[" + bounds + "," + obj + "]";  }  private Rectangle bounds;  private Object obj;}

⌨️ 快捷键说明

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