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

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • putExtra (Intent)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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