Examples of compare()


Examples of org.dom4j.util.NodeComparator.compare()

        Document result = provider.getWsdlDOM();
        Document expected = reader.read(getClass().getResourceAsStream("wsdl-dtc-wsdl.xml"));

        //System.out.println(result.asXML());
        NodeComparator comparator = new NodeComparator();
        assertEquals(6, comparator.compare(expected, result));
    }
}
View Full Code Here

Examples of org.drools.planner.benchmark.core.ranking.SingleBenchmarkRankingComparator.compare()

        int ranking = 0;
        SingleBenchmark previousSingleBenchmark = null;
        int previousSameRankingCount = 0;
        for (SingleBenchmark singleBenchmark : rankedSingleBenchmarkList) {
            if (previousSingleBenchmark != null
                    && singleBenchmarkRankingComparator.compare(previousSingleBenchmark, singleBenchmark) != 0) {
                ranking += previousSameRankingCount;
                previousSameRankingCount = 0;
            }
            singleBenchmark.setRanking(ranking);
            previousSingleBenchmark = singleBenchmark;
View Full Code Here

Examples of org.drools.spi.ConflictResolver.compare()

        MockControl resolverControl_2 = mocks.createControl(ConflictResolver.class);
        final ConflictResolver resolverMock_2 = (ConflictResolver) resolverControl_2.getMock();

        // Return value needs to be zero for the next resolver to be invoked
        resolverControl_1.expectAndReturn(resolverMock_1.compare(leftActivationMock, rightActivationMock), 0);
        resolverControl_2.expectAndReturn(resolverMock_2.compare(leftActivationMock, rightActivationMock), 0);

        factory.setResolverStrategies(new ArrayList() {{
            add(resolverMock_1);
            add(resolverMock_2);
        }});
View Full Code Here

Examples of org.dyno.visual.swing.types.editor.spinnermodels.SpinnerModelType.compare()

      } else {
        Class clazz1 = o1.getClass();
        Class clazz2 = o2.getClass();
        if (clazz1 == clazz2) {
          SpinnerModelType type = SpinnerNumberModelType.getSpinnerModelType(o1);
          return type.compare(o1, o2);
        } else {
          return 1;
        }
      }
    }
View Full Code Here

Examples of org.eclipse.jface.viewers.ViewerSorter.compare()

    int count = combo.getItemCount();
    int min = 0, max = count - 1;
    while (min <= max) {
      int mid = (min + max) / 2;
      Object data = comboMap.get(mid);
      int compare = sorter.compare(this, data, element);
      if (compare == 0) {
        // find first item > element
        while (compare == 0) {
          ++mid;
          if (mid >= count) {
View Full Code Here

Examples of org.encog.ml.ea.sort.MaximizeAdjustedScoreComp.compare()

    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MaximizeAdjustedScoreComp comp = new MaximizeAdjustedScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)<0);
  }
 
  @Test
  public void testIsBetterThan() {
    MaximizeAdjustedScoreComp comp = new MaximizeAdjustedScoreComp();
View Full Code Here

Examples of org.encog.ml.ea.sort.MaximizeScoreComp.compare()

    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MaximizeScoreComp comp = new MaximizeScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)>0);
  }
 
  @Test
  public void testIsBetterThan() {
    MaximizeScoreComp comp = new MaximizeScoreComp();
View Full Code Here

Examples of org.encog.ml.ea.sort.MinimizeAdjustedScoreComp.compare()

    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MinimizeAdjustedScoreComp comp = new MinimizeAdjustedScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)>0);
  }
 
  @Test
  public void testIsBetterThan() {
    MinimizeAdjustedScoreComp comp = new MinimizeAdjustedScoreComp();
View Full Code Here

Examples of org.encog.ml.ea.sort.MinimizeScoreComp.compare()

    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MinimizeScoreComp comp = new MinimizeScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)<0);
  }
 
  @Test
  public void testIsBetterThan() {
    MinimizeScoreComp comp = new MinimizeScoreComp();
View Full Code Here

Examples of org.exoplatform.services.document.diff.DiffService.compare()

   protected abstract DiffAlgorithm getAlgo();

   public void testCompare()
   {
      DiffService diffService = new DiffServiceImpl(getAlgo());
      assertTrue(!diffService.compare(original, empty));
      assertTrue(!diffService.compare(empty, original));
      assertTrue(diffService.compare(empty, empty));
      assertTrue(diffService.compare(original, original));
   }
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.