站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

EqualityKey (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.common
Class EqualityKey

java.lang.Object
  extended by org.drools.common.EqualityKey
All Implemented Interfaces:
Serializable

public class EqualityKey
extends Object
implements Serializable

Upon instantiation the EqualityKey caches the first Object's hashCode this can never change. The EqualityKey has an internal datastructure which references all the handles which are equal. It also records Whether the referenced facts are JUSTIFIED or STATED

Author:
Mark Proctor
See Also:
Serialized Form

Field Summary
static int JUSTIFIED
           
static int STATED
           
 
Constructor Summary
EqualityKey(InternalFactHandle handle)
           
EqualityKey(InternalFactHandle handle, int status)
           
 
Method Summary
 void addFactHandle(InternalFactHandle handle)
           
 boolean equals(Object object)
          Equality for the EqualityKey means two things.
 InternalFactHandle getFactHandle()
           
 List getOtherFactHandle()
           
 int getStatus()
           
 int hashCode()
          Returns the cached hashCode
 boolean isEmpty()
           
 void removeFactHandle(InternalFactHandle handle)
           
 void setStatus(int status)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STATED

public static final int STATED
See Also:
Constant Field Values

JUSTIFIED

public static final int JUSTIFIED
See Also:
Constant Field Values
Constructor Detail

EqualityKey

public EqualityKey(InternalFactHandle handle)

EqualityKey

public EqualityKey(InternalFactHandle handle,
                   int status)
Method Detail

getFactHandle

public InternalFactHandle getFactHandle()

getOtherFactHandle

public List getOtherFactHandle()

addFactHandle

public void addFactHandle(InternalFactHandle handle)

removeFactHandle

public void removeFactHandle(InternalFactHandle handle)

getStatus

public int getStatus()
Returns:
the status

setStatus

public void setStatus(int status)
Parameters:
status - the status to set

size

public int size()

isEmpty

public boolean isEmpty()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Returns the cached hashCode

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object object)
Equality for the EqualityKey means two things. It returns true if the object is also an EqualityKey the of the same the same identity as this. It also returns true if the object is equal to the head FactHandle's referenced Object.

Overrides:
equals in class Object


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.