Examples of compare()


Examples of com.ibm.icu.text.RuleBasedCollator.compare()

        } catch (Exception e) {
            errln("cannot create rulebased collator");
            return;
        }
       
        if (coll.compare(testdata2[0], testdata2[1]) != -1) {
            errln("Expected " + testdata2[0] + " < " + testdata2[1]);
            return;
        }
        if (coll.compare(testdata2[1], testdata2[2]) != -1) {
            errln("Expected " + testdata2[1] + " < " + testdata2[2]);
View Full Code Here

Examples of com.liferay.util.xml.ElementComparator.compare()

      }
    }

    ElementComparator comparator = new ElementComparator();

    if (comparator.compare(el1, el2) == 0) {
      return true;
    }
    else {
      return false;
    }
View Full Code Here

Examples of com.mobixess.jodb.core.plugin.IClassProcessor.compare()

                if(originClass != activeObject.getClass()){
                    processCompareResult(COMPARE_RESULT.UNKNOWN);
                    return;
                }
                IClassProcessor processor = JODBPluginRegistry.getInstance().getClassProcessor(originClass);
                COMPARE_RESULT compareResult = processor.compare(getObject(),activeObject, context, null);
                processCompareResult(compareResult);
                return;
            }
        }
       
View Full Code Here

Examples of com.mucommander.commons.file.util.FileComparator.compare()

        while(left<=right) {
            mid = (right-left)/2 + left;
            midFile = getCachedFileAtRow(mid);
            if(midFile.equals(file))
                return mid;
            if(fc.compare(file, midFile)<0)
                right = mid-1;
            else
                left = mid+1;
        }
   
View Full Code Here

Examples of com.niacin.metaheuristic.FitnessComparator.compare()

        double bestImprovement = 0;
        boolean moved = false;
        FitnessComparator comparator = new SimpleFitnessComparator();
        for (Solution neighbour : neighbours)
        {
          double improvement = comparator.compare(problem, neighbour, currentSolution);
          if (improvement > bestImprovement)
          {
            currentSolution = neighbour;
            nextSolution = neighbour;
            bestImprovement = improvement;
View Full Code Here

Examples of com.niacin.metaheuristic.SimpleFitnessComparator.compare()

        double bestImprovement = 0;
        boolean moved = false;
        FitnessComparator comparator = new SimpleFitnessComparator();
        for (Solution neighbour : neighbours)
        {
          double improvement = comparator.compare(problem, neighbour, currentSolution);
          if (improvement > bestImprovement)
          {
            currentSolution = neighbour;
            nextSolution = neighbour;
            bestImprovement = improvement;
View Full Code Here

Examples of com.opengamma.util.beancompare.BeanCompare.compare()

    } else {
      for (ManageableSecurity foundSecurity : searchResult.getSecurities()) {
        List<BeanDifference<?>> differences = null;
        if (foundSecurity.getClass().equals(security.getClass())) {
          try {
            differences = beanCompare.compare(foundSecurity, security);
          } catch (Exception e) {
            s_logger.error("Error comparing securities with ID bundle " + security.getExternalIdBundle(), e);
            return null;
          }
        }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseCompare.compare()

            System.out.println(text);
          }
        });
    databaseCompare.setCompareIndexMetadata(true);

    Assert.assertTrue(databaseCompare.compare());
  }

  private void copyDataFromTestWithoutClose() throws Exception {
    final String testStoragePath = baseDocumentTx.getURL().substring("plocal:".length());
    final String copyTo = buildDir.getAbsolutePath() + File.separator + "testLocalPaginatedStorageRestoreFromTx";
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ODocumentComparator.compare()

    ODocument doc2 = new ODocument().field("testField", (Object) null);

    ODocumentComparator comparator = new ODocumentComparator(
        Collections.singletonList(new OPair<String, String>("testField", "asc")), new OBasicCommandContext());

    Assert.assertEquals(comparator.compare(doc1, doc2), 0);
  }
}
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.compare()

   * @see com.projity.pm.scheduling.Schedule#moveInterval(java.lang.Object, long, long, com.projity.pm.scheduling.ScheduleInterval)
   */
  public void moveInterval(Object eventSource, long start, long end, ScheduleInterval oldInterval, boolean isChild) {
    WorkCalendar cal = getEffectiveWorkCalendar();
    start = cal.adjustInsideCalendar(start,false);
    boolean shifting = cal.compare(start,oldInterval.getStart(),false) != 0;
    long assignmentStart = getEarliestAssignmentStart();
    long amountFromStart = cal.compare(oldInterval.getStart(),assignmentStart,false); // possible that they are not the same but there is no working time between them
    if (shifting && amountFromStart == 0L) { // see if first bar shifted -The first bar is drawn from the first assignment and not from the task start.
      // To figure out the new task start, see how much the shift of this bar is, then apply that difference to the task start
      long shift = cal.compare(start,assignmentStart,false);
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.