Package org.drools.reteoo

Source Code of org.drools.reteoo.ModuleImpl

package org.drools.reteoo;

import org.drools.util.PriorityQueue;

import org.drools.spi.ConflictResolver;
import org.drools.spi.Module;

public class ModuleImpl implements Module
{  
    private final String name;

    /** Items in the agenda. */
    private final PriorityQueue     activationQueue;   
       
    public ModuleImpl(String name,
                      ConflictResolver conflictResolver)
    {
        this.name = name;
        this.activationQueue = new PriorityQueue( conflictResolver );   
    }   
   
    public String getName()
    {
        return this.name;
    }
   
    public boolean equal(Object object)
    {
        if ( ( object == null ) || ! ( object instanceof ModuleImpl ) )
        {
            return false;
        }
       
        if ( ( (ModuleImpl) object).name.equals( this.name ) )
        {
            return true;
        }
       
        return false;
    }
   
    public int hashcode()
    {
        return this.name.hashCode();
    }

    public PriorityQueue getActivationQueue()
    {
        return this.activationQueue;
    }

}
TOP

Related Classes of org.drools.reteoo.ModuleImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.