Examples of IPattern


Examples of org.drools.workbench.models.datamodel.rule.IPattern

        assertEquals( "rule1",
                      m.name );

        assertEquals( 1,
                      m.lhs.length );
        IPattern p = m.lhs[ 0 ];
        assertTrue( p instanceof FactPattern );

        FactPattern fp = (FactPattern) p;
        assertEquals( "Room",
                      fp.getFactType() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.IPattern

        assertEquals( "rule1",
                      m.name );

        assertEquals( 1,
                      m.lhs.length );
        IPattern p = m.lhs[ 0 ];
        assertTrue( p instanceof FactPattern );

        FactPattern fp = (FactPattern) p;
        assertEquals( "Applicant",
                      fp.getFactType() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.IPattern

        assertEquals( "rule1",
                      m.name );

        assertEquals( 1,
                      m.lhs.length );
        IPattern p = m.lhs[ 0 ];
        assertTrue( p instanceof FactPattern );

        FactPattern fp = (FactPattern) p;
        assertEquals( "Applicant",
                      fp.getFactType() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.IPattern

            assertEquals( "rule1",
                          m.name );

            assertEquals( 1,
                          m.lhs.length );
            IPattern p = m.lhs[ 0 ];
            assertTrue( p instanceof FactPattern );

            FactPattern fp = (FactPattern) p;
            assertEquals( "Bundle",
                          fp.getFactType() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.IPattern

            assertEquals( "rule1",
                          m.name );

            assertEquals( 1,
                          m.lhs.length );
            IPattern p = m.lhs[ 0 ];
            assertTrue( p instanceof FactPattern );

            FactPattern fp = (FactPattern) p;
            assertEquals( "Applicant",
                          fp.getFactType() );
View Full Code Here

Examples of org.objectstyle.wolips.core.resources.pattern.IPattern

    return this.patternList.toArray(new IPattern[this.patternList.size()]);
  }

  public boolean matches(String string) {
    for (int i = 0; i < this.patternList.size(); i++) {
      IPattern pattern = this.patternList.get(i);
      if (pattern.matches(string)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of tconstruct.library.util.IPattern

        if (slotID == 4 || slotID == 5)
        {
            if (!craftedTop && inventory[0] != null)
            {
                int value = PatternBuilder.instance.getPartValue(inventory[2]);
                IPattern item = (IPattern) inventory[0].getItem();
                int cost = item != null ? item.getPatternCost(inventory[0]) : 0;
                if (value > 0 && cost > 0)
                {
                    int decrease = cost / value;
                    if (cost % value != 0)
                        decrease++;
                    super.decrStackSize(2, decrease); //Call super to avoid crafting again
                }
            }

            if (inventory[4] != null || inventory[5] != null)
                craftedTop = true;
            else
                craftedTop = false;
        }

        if (!craftedTop)
            buildTopPart();

        if (slotID == 6 || slotID == 7)
        {
            if (!craftedBottom && inventory[1] != null)
            {
                int value = PatternBuilder.instance.getPartValue(inventory[3]);
                IPattern item = (IPattern) inventory[1].getItem();
                int cost = item != null ? item.getPatternCost(inventory[1]) : 0;
                if (value > 0 && cost > 0)
                {
                    int decrease = cost / value;
                    if (cost % value != 0)
                        decrease++;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.