Package org.drools.core.util.AbstractHashTable

Examples of org.drools.core.util.AbstractHashTable.FieldIndex


        final Declaration declaration = new Declaration( "typeOfCheese",
                                                         extractor,
                                                         pattern );

        final FieldIndex fieldIndex = new FieldIndex( extractor,
                                                      declaration,
                                                      equals.getEvaluator( ValueType.STRING_TYPE,
                                                                           Operator.EQUAL ) );

        final ConcurrentHashTable map = new ConcurrentHashTable( new FieldIndex[]{fieldIndex} );
View Full Code Here


        final Declaration declaration = new Declaration( "typeOfCheese",
                                                         extractor,
                                                         pattern );

        final FieldIndex fieldIndex = new FieldIndex( extractor,
                                                      declaration,
                                                      equals.getEvaluator( ValueType.STRING_TYPE,
                                                                           Operator.EQUAL ) );

        final ConcurrentHashTable map = new ConcurrentHashTable( new FieldIndex[]{fieldIndex}, 16,
View Full Code Here

        final Declaration declaration = new Declaration( "typeOfCheese",
                                                         extractor,
                                                         pattern );

        final FieldIndex fieldIndex = new FieldIndex( extractor,
                                                      declaration,
                                                      equals.getEvaluator( ValueType.STRING_TYPE,
                                                                           Operator.EQUAL ) );

        final RightTupleIndexHashTable map = new RightTupleIndexHashTable( new FieldIndex[]{fieldIndex} );
View Full Code Here

        BetaMemory memory;

        final List list = new ArrayList( 2 );
        if ( this.indexed0 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint0;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );

        }

        if ( this.indexed1 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint1;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( this.indexed2 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint2;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( this.indexed3 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint3;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( !list.isEmpty() ) {
            final FieldIndex[] indexes = (FieldIndex[]) list.toArray( new FieldIndex[list.size()] );
View Full Code Here

    public BetaMemory createBetaMemory(final RuleBaseConfiguration config,
                                       final short nodeType) {
        BetaMemory memory;
        if ( this.indexed ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            LeftTupleMemory tupleMemory;
            if ( this.conf.isIndexLeftBetaMemory() ) {
                tupleMemory = new LeftTupleIndexHashTable( new FieldIndex[]{index} );
            } else {
                tupleMemory = new LeftTupleList();
View Full Code Here

        BetaMemory memory;

        final List list = new ArrayList( 2 );
        if ( this.indexed0 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint0;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );

        }

        if ( this.indexed1 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint1;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( this.indexed2 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint2;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( !list.isEmpty() ) {
            final FieldIndex[] indexes = (FieldIndex[]) list.toArray( new FieldIndex[list.size()] );
View Full Code Here

        BetaMemory memory;

        final List<FieldIndex> list = new ArrayList<FieldIndex>( 2 );
        if ( this.indexed0 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint0;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( this.indexed1 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint1;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( !list.isEmpty() ) {
            final FieldIndex[] indexes = list.toArray( new FieldIndex[list.size()] );
View Full Code Here

            final List<FieldIndex> list = new ArrayList<FieldIndex>();

            for ( int pos = 0; pos <= this.indexed; pos++ ) {
                final Constraint constraint = (Constraint) entry.getObject();
                final IndexableConstraint indexableConstraint = (IndexableConstraint) constraint;
                final FieldIndex index = indexableConstraint.getFieldIndex();
                list.add( index );
                entry = (LinkedListEntry) entry.getNext();
            }

            final FieldIndex[] indexes = list.toArray( new FieldIndex[list.size()] );
View Full Code Here

    }

    public FieldIndex getFieldIndex() {
        // declaration's offset can be modified by the reteoo's PatternBuilder so modify the indexingDeclaration accordingly
        indexingDeclaration.getPattern().setOffset(declarations[0].getPattern().getOffset());
        return new FieldIndex(extractor, indexingDeclaration, INDEX_EVALUATOR);
    }
View Full Code Here

    }

    public FieldIndex getFieldIndex() {
        // declaration's offset can be modified by the reteoo's PatternBuilder so modify the indexingDeclaration accordingly
        indexingDeclaration.getPattern().setOffset(declarations[0].getPattern().getOffset());
        return new FieldIndex(extractor, indexingDeclaration, INDEX_EVALUATOR);
    }
View Full Code Here

TOP

Related Classes of org.drools.core.util.AbstractHashTable.FieldIndex

Copyright © 2018 www.massapicom. 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.