Examples of compare()


Examples of org.exoplatform.services.document.impl.diff.DiffServiceImpl.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

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeDefinitionComparator.compare()

      affectedNodes.add(nodeData);

      // child nodes
      final NodeDefinitionComparator nodeDefinitionComparator =
         new NodeDefinitionComparator(this, dataManager, itemAutocreator, affectedNodes);
      changesLog.addAll(nodeDefinitionComparator.compare(recipientDefinition,
         getAllChildNodeDefinitions(ancestorAllNodeTypeNames), getAllChildNodeDefinitions(recipienAllNodeTypeNames))
         .getAllStates());

      // properties defs
      final PropertyDefinitionComparator propertyDefinitionComparator =
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.PropertyDefinitionComparator.compare()

         .getAllStates());

      // properties defs
      final PropertyDefinitionComparator propertyDefinitionComparator =
         new PropertyDefinitionComparator(this, dataManager, itemAutocreator, affectedNodes, locationFactory);
      changesLog.addAll(propertyDefinitionComparator.compare(recipientDefinition,
         getAllPropertyDefinitions(ancestorAllNodeTypeNames), getAllPropertyDefinitions(recipienAllNodeTypeNames))

      .getAllStates());

      return changesLog;
View Full Code Here

Examples of org.fenixedu.academic.dto.comparators.CalendarDateComparator.compare()

    public Boolean isActive(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        CalendarDateComparator calendarDateComparator = new CalendarDateComparator();
        Boolean result = Boolean.FALSE;
        if (calendarDateComparator.compare(getBeginDate(), calendar) <= 0) {
            if (getEndDate() == null || calendarDateComparator.compare(getEndDate(), calendar) >= 0) {
                result = Boolean.TRUE;
            }
        }
        return result;
View Full Code Here

Examples of org.geotools.feature.FeatureComparators.Name.compare()

        SimpleFeature f3 = b.buildFeature(null, new Object[] { null, null });

        Name compareName = new FeatureComparators.Name("name");

        // f1 has name, f2 has null name, expecting that f1 is greater g2
        assertTrue(compareName.compare(f1, f2) > 0);
        assertTrue(compareName.compare(f2, f1) < 0);
        assertTrue(compareName.compare(f2, f3) == 0);

        Name compareNumber = new FeatureComparators.Name("name");
        // f1 has number, f2 has null number, expecting that f1 is greater g2
View Full Code Here

Examples of org.geotools.gce.grassraster.core.color.ColorRule.compare()

        int high = rules.size() - 1;

        while( low <= high ) {
            i = (low + high) / 2;
            ColorRule crule = (ColorRule) rules.elementAt(i);
            int c = crule.compare(cat);
            // System.out.println("C="+c+", I="+i+", cat="+cat+",
            // CRULE="+crule);
            if (c == 0) {
                /*
                 * Attribute found with equal value so break and insert using this index.
View Full Code Here

Examples of org.gitective.core.stat.EarliestComparator.compare()

        TimeZone.getDefault()));

    EarliestComparator comparator = new EarliestComparator();
    assertEquals(0, comparator.compare(user1, user1));
    assertEquals(0, comparator.compare(user2, user2));
    assertTrue(comparator.compare(user1, user2) < 0);
    assertTrue(comparator.compare(user2, user1) > 0);
  }
}
View Full Code Here

Examples of org.gitective.core.stat.LatestComparator.compare()

    user2.include(commit, new PersonIdent("b", "c", new Date(2000),
        TimeZone.getDefault()));

    LatestComparator comparator = new LatestComparator();
    assertEquals(0, comparator.compare(user1, user1));
    assertEquals(0, comparator.compare(user2, user2));
    assertTrue(comparator.compare(user2, user1) < 0);
    assertTrue(comparator.compare(user1, user2) > 0);
  }
}
View Full Code Here

Examples of org.gradle.api.plugins.buildcomparison.gradle.internal.GradleBuildComparison.compare()

        hostAttributes.put("Project", getProject().getRootDir().getAbsolutePath());
        hostAttributes.put("Task", getPath());
        hostAttributes.put("Gradle version", GradleVersion.current().getVersion());
        hostAttributes.put("Executed at", new SimpleDateFormat().format(new Date()));

        BuildComparisonResult result = comparison.compare(fileStore, getReportDir(), hostAttributes);
        communicateResult(result);
    }

    private void communicateResult(BuildComparisonResult result) {
        String reportUrl = new ConsoleRenderer().asClickableFileUrl(getReportFile());
View Full Code Here

Examples of org.h2.engine.Database.compare()

            return true;
        }
        Database db = session.getDatabase();
        if (database.getMode().lowerCaseIdentifiers) {
            Value v = ValueStringIgnoreCase.get(value);
            if (indexFrom.equals(indexTo) && db.compare(v, indexFrom) != 0) {
                return false;
            }
        } else {
            Value v = ValueString.get(value);
            if (indexFrom != null && db.compare(v, indexFrom) < 0) {
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.