Search in sources :

Example 11 with ObjectEntry

use of org.drools.core.util.ObjectHashMap.ObjectEntry in project drools by kiegroup.

the class ObjectHashSet method toArray.

public Object[] toArray(Object[] objects) {
    Iterator it = iterator();
    int i = 0;
    for (ObjectEntry entry = (ObjectEntry) it.next(); entry != null; entry = (ObjectEntry) it.next()) {
        objects[i++] = entry.getValue();
    }
    return objects;
}
Also used : ObjectEntry(org.drools.core.util.ObjectHashMap.ObjectEntry)

Aggregations

ObjectEntry (org.drools.core.util.ObjectHashMap.ObjectEntry)11 Test (org.junit.Test)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 EqualityKey (org.drools.core.common.EqualityKey)3 NamedEntryPoint (org.drools.core.common.NamedEntryPoint)3 ObjectHashMap (org.drools.core.util.ObjectHashMap)3 Ignore (org.junit.Ignore)3 KieSession (org.kie.api.runtime.KieSession)3 FactHandle (org.kie.api.runtime.rule.FactHandle)3 Person (org.drools.compiler.Person)2 Iterator (org.drools.core.util.Iterator)2 InternalFactHandle (org.drools.core.common.InternalFactHandle)1 IndexableConstraint (org.drools.core.rule.IndexableConstraint)1 AlphaNodeFieldConstraint (org.drools.core.spi.AlphaNodeFieldConstraint)1 Match (org.kie.api.runtime.rule.Match)1 RuleEventListener (org.kie.internal.event.rule.RuleEventListener)1 RuleEventManager (org.kie.internal.event.rule.RuleEventManager)1