tuplematches.java

来自「drools 一个开放源码的规则引擎」· Java 代码 · 共 50 行

JAVA
50
字号
package org.drools.reteoo;

import java.util.ArrayList;
import java.util.List;

class TupleMatches
{

    private final ReteTuple tuple;
    private final List      matches;

    TupleMatches(ReteTuple tuple)
    {
        super( );
        this.tuple = tuple;
        this.matches = new ArrayList( );
    }

    TupleKey getKey()
    {
        return this.tuple.getKey( );
    }

    ReteTuple getTuple()
    {
        return this.tuple;
    }

    List getMatches()
    {
        return this.matches;
    }

    void addMatch(FactHandleImpl handle)
    {
        this.matches.add( handle );
    }
    
    void removeMatch(FactHandleImpl handle)
    {
        this.matches.remove( handle );
    }
    

    boolean matched(FactHandleImpl handle)
    {
        return this.matches.contains( handle );
    }
}

⌨️ 快捷键说明

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