congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ObjectHashMap.isEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isEmpty
method
in
org.drools.core.util.ObjectHashMap

Best Java code snippets using org.drools.core.util.ObjectHashMap.isEmpty (Showing top 5 results out of 315)

origin: org.drools/drools-compiler

  assertTrue(tms.getEqualityKeyMap().isEmpty());
} finally {
  ksession.dispose();
origin: org.drools/drools-compiler

@Test(timeout=10000)
public void testLogicalInsertOrder() throws Exception {
  // JBRULES-1602
  // "rule 1" is never logical inserted, as it's rule is unmatched prior to calling logical insert
  KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
  kbuilder.add( ResourceFactory.newClassPathResource( "test_LogicalInsertOrder.drl",
                            getClass() ),
         ResourceType.DRL );
  InternalKnowledgeBase kbase = (InternalKnowledgeBase) getKnowledgeBase();
  kbase.addPackages( kbuilder.getKnowledgePackages() );
  kbase = SerializationHelper.serializeObject(kbase);
  final KieSession session = createKnowledgeSession(kbase);
  try {
    RuleRuntimeEventListener wmel = mock( RuleRuntimeEventListener.class );
    session.addEventListener( wmel );
    Person bob = new Person( "bob" );
    bob.setStatus( "hungry" );
    Person mark = new Person( "mark" );
    mark.setStatus( "thirsty" );
    session.insert( bob );
    session.insert( mark );
    int count = session.fireAllRules();
    assertEquals( 2, count );
    assertEquals(2, session.getObjects().size());
    TruthMaintenanceSystem tms =  ((NamedEntryPoint)session.getEntryPoint(EntryPointId.DEFAULT.getEntryPointId()) ).getTruthMaintenanceSystem();
    assertTrue(tms.getEqualityKeyMap().isEmpty());
  } finally {
    session.dispose();
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

if ( this.hashedSinkMap.isEmpty() ) {
  this.hashedSinkMap = null;
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

ObjectHashMap justifiedMap = context.wm.getTruthMaintenanceSystem().getJustifiedMap();
if (!assertMap.isEmpty() || !justifiedMap.isEmpty()) {
  EqualityKey[] keys = new EqualityKey[assertMap.size()];
  org.drools.core.util.Iterator it = assertMap.iterator();
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

private static ProtobufMessages.NodeMemory writeRIANodeMemory(final int nodeId,
    final Memory memory) {
  // for RIA nodes, we need to store the ID of the created handles
  RIAMemory mem = (RIAMemory) memory;
  if (!mem.memory.isEmpty()) {
    ProtobufMessages.NodeMemory.RIANodeMemory.Builder _ria = ProtobufMessages.NodeMemory.RIANodeMemory.newBuilder();
    final org.drools.core.util.Iterator it = mem.memory.iterator();
    // iterates over all propagated handles and assert them to the new sink
    for (ObjectEntry entry = (ObjectEntry) it.next(); entry != null; entry = (ObjectEntry) it.next()) {
      LeftTuple leftTuple = (LeftTuple) entry.getKey();
      InternalFactHandle handle = (InternalFactHandle) entry.getValue();
      FactHandle _handle = ProtobufMessages.FactHandle.newBuilder()
          .setId(handle.getId())
          .setRecency(handle.getRecency())
          .build();
      _ria.addContext(ProtobufMessages.NodeMemory.RIANodeMemory.RIAContext.newBuilder()
          .setTuple(PersisterHelper.createTuple(leftTuple))
          .setResultHandle(_handle)
          .build());
    }
    return ProtobufMessages.NodeMemory.newBuilder()
        .setNodeId(nodeId)
        .setNodeType(ProtobufMessages.NodeMemory.NodeType.RIA)
        .setRia(_ria.build())
        .build();
  }
  return null;
}
org.drools.core.utilObjectHashMapisEmpty

Popular methods of ObjectHashMap

  • iterator
  • size
  • <init>
  • get
  • put
  • clear
  • indexOf
  • newIterator
  • remove
  • resize
  • setComparator
  • setComparator

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JLabel (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now