Codota Logo
LinkedList.size
Code IndexAdd Codota to your IDE (free)

How to use
size
method
in
org.drools.core.util.LinkedList

Best Java code snippets using org.drools.core.util.LinkedList.size (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.drools/drools-core

@Test
public void testSize() {
  this.list.add( this.node1 );
  assertEquals( "LinkedList should have 1 node",
             this.list.size(),
             1 );
  this.list.add( this.node2 );
  assertEquals( "LinkedList should have 2 nodes",
             this.list.size(),
             2 );
  this.list.add( this.node3 );
  assertEquals( "LinkedList should have 3 nodes",
             this.list.size(),
             3 );
}
origin: org.drools/drools-core

  protected BetaNodeFieldConstraint[] convertToConstraints(LinkedList list) {
    final BetaNodeFieldConstraint[] array = new BetaNodeFieldConstraint[list.size()];
    int i = 0;
    for ( LinkedListEntry entry = (LinkedListEntry) list.getFirst(); entry != null; entry = (LinkedListEntry) entry.getNext() ) {
      array[i++] = (BetaNodeFieldConstraint) entry.getObject();
    }
    return array;
  }
}
origin: org.drools/drools-core

@Test
public void testClear() {
  this.list.add( this.node1 );
  this.list.add( this.node2 );
  this.list.add( this.node3 );
  assertEquals( "List size should be 3",
             this.list.size(),
             3 );
  this.list.clear();
  assertEquals( "Empty list should have size 0",
             this.list.size(),
             0 );
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public int size() {
  return this.list.size();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public int size() {
  return this.list.size();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public boolean equals(final Object object) {
  if ( object == this ) {
    return true;
  }
  if ( !(object instanceof LinkedList) ) {
    return false;
  }
  final LinkedList other = (LinkedList) object;
  if ( this.size() != other.size() ) {
    return false;
  }
  for ( LinkedListNode thisNode = this.firstNode, otherNode = other.firstNode; thisNode != null && otherNode != null; thisNode = thisNode.getNext(), otherNode = otherNode.getNext() ) {
    if ( !thisNode.equals( otherNode ) ) {
      return false;
    }
  }
  return true;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public Activation[] getScheduledActivations() {
  Activation[] scheduledActivations = new Activation[this.scheduledActivations.size()];
  int i = 0;
  for ( ScheduledAgendaItem node = this.scheduledActivations.getFirst(); node != null; node = node.getNext() ) {
    scheduledActivations[i++] = node;
  }
  return scheduledActivations;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public Activation[] getActivations() {
  Activation[] activations = new Activation[ list.size() ];
  final Iterator<ActivationNode> it = this.list.iterator();
  int i = 0;
  for ( ActivationNode node = it.next(); node != null; node = it.next() ) {
    activations[i++] =  node.getActivation();
  }        
  
  return activations;
}
origin: org.drools/drools-core

          this.node2 );
assertEquals( "LinkedList should have 3 nodes",
           this.list.size(),
           3 );
assertSame( "First node should be node1",
origin: org.drools/drools-reteoo

assertEquals( 2, item1.getBlocked().size() );
assertEquals( 1, item2.getBlockers().size() );
assertEquals( 1, item3.getBlockers().size() );
assertEquals( 2, item1.getBlocked().size() );
assertEquals( 1, item2.getBlocked().size() );
assertEquals( 1, item2.getBlockers().size() );
assertEquals( 2, item3.getBlockers().size() );        
origin: org.drools/drools-reteoo

assertEquals( 0, item3.getBlockers().size() );
assertNull( item3.getBlocked() );
assertEquals( 0, item2.getBlocked().size() );
assertNull( item2.getBlockers() );
assertEquals( 0, item1.getBlocked().size() );
assertEquals( 0, item1.getBlocked().size() );              
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void blockActivation(org.drools.runtime.rule.Activation act) {
  AgendaItem targetMatch = ( AgendaItem ) act;
  // iterate to find previous equal logical insertion
  LogicalDependency dep = null;
  if ( this.previousJustified != null ) {
    for ( dep = this.previousJustified.getFirst(); dep != null; dep = dep.getNext() ) {
      if ( targetMatch ==  dep.getJustified() ) {
        this.previousJustified.remove( dep );
        break;
      }
    }
  }
  if ( dep == null ) {
    dep = new SimpleLogicalDependency( activation, targetMatch );
  }
  this.activation.addBlocked(  dep );
  if ( targetMatch.getBlockers().size() == 1 && targetMatch.isActive()  ) {
    // it wasn't blocked before, but is now, so we must remove it from all groups, so it cannot be executed.
    targetMatch.remove();
    if ( targetMatch.getActivationGroupNode() != null ) {
      targetMatch.getActivationGroupNode().getActivationGroup().removeActivation( targetMatch );
    }
    if ( targetMatch.getActivationNode() != null ) {
      final InternalRuleFlowGroup ruleFlowGroup = (InternalRuleFlowGroup) targetMatch.getActivationNode().getParentContainer();
      ruleFlowGroup.removeActivation( targetMatch );
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

if ( activation.isCanceled() || ( activation.getBlockers() != null && activation.getBlockers().size() > 0 ) ) {
origin: org.drools/drools-reteoo

assertEquals( 1, item1.getBlocked().size() );
assertEquals( item4, ((LogicalDependency)item1.getBlocked().getFirst()).getJustified() );
assertEquals( 0, item2.getBlockers().size() );
assertEquals( 0, item3.getBlockers().size() );
assertEquals( 1, item4.getBlockers().size() );
origin: org.drools/drools-reteoo

assertEquals( 0, item2.getBlockers().size() );        
assertEquals( 1, item2.getBlocked().size() );
assertEquals(1, item3.getBlockers().size());
assertNull(item3.getBlocked());
assertSame( item2, ((LogicalDependency)item2.getBlocked().getFirst()).getJustifier() );
assertEquals( 0, item3.getBlockers().size() );
assertNull( item3.getBlocked() );
assertEquals( 1, item2.getBlocked().size() );
assertEquals(1, item3.getBlockers().size());
assertNull(item3.getBlocked());
assertSame( item2, ((LogicalDependency)item2.getBlocked().getFirst()).getJustifier() );
assertNull( item3.getBlocked() );
assertEquals( 0, item2.getBlocked().size() );
assertNull( item2.getBlockers() );
org.drools.core.utilLinkedListsize

Popular methods of LinkedList

  • getFirst
    Return the first node in the list
  • <init>
    Construct an empty LinkedList
  • add
    Add a LinkedListNode to the list. If the LinkedList is empty then the first and last nodes are set t
  • clear
    Iterates the list removing all the nodes until there are no more nodes to remove.
  • isEmpty
  • remove
    Removes a LinkedListNode from the list. This works by attach the previous reference to the child ref
  • removeFirst
    Remove the first node from the list. The next node then becomes the first node. If this is the last
  • removeLast
    Remove the last node from the list. The previous node then becomes the last node. If this is the las
  • get
  • getLast
    Return the last node in the list
  • insertAfter
  • iterator
  • insertAfter,
  • iterator,
  • javaUtilIterator

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • JTable (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now