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

📄 mockobjecttype.java

📁 rule engine drools-2.0-beta-18
💻 JAVA
字号:
package org.drools;import org.drools.spi.ObjectType;public class MockObjectType implements ObjectType{    private Class type;    public MockObjectType()    {    }    public MockObjectType(Class type)    {        this.type = type;    }    public boolean matches(Object object)    {        if ( this.type == null )        {            return true;        }        return this.type.isInstance( object );    }    public boolean equals(Object thatObj)    {        if ( thatObj instanceof MockObjectType )        {            MockObjectType that = ( MockObjectType ) thatObj;            if ( this.type == null && that.type == null )            {                return true;            }            if ( this.type == null || that.type == null )            {                return false;            }            return this.type.equals( that.type );        }        return false;    }    public int hashCode()    {        if ( this.type == null )        {            return 0;        }        return this.type.hashCode( );    }}

⌨️ 快捷键说明

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