Examples of compare()


Examples of org.h2.result.SortOrder.compare()

                final SortOrder sortOrder = sort;
                Collections.sort(list, new Comparator<Value>() {
                    public int compare(Value v1, Value v2) {
                        Value[] a1 = ((ValueArray) v1).getList();
                        Value[] a2 = ((ValueArray) v2).getList();
                        return sortOrder.compare(a1, a2);
                    }
                });
            }
            StatementBuilder buff = new StatementBuilder();
            String sep = separator == null ? "," : separator.getValue(session).getString();
View Full Code Here

Examples of org.hsqldb.types.Type.compare()

                }

                HsqlArrayList list    = new HsqlArrayList();
                Object        current = data[0];
                Type          type    = nodes[0].getDataType();
                boolean ascending = type.compare(session, data[1], data[0])
                                    >= 0;

                while (true) {
                    int compare = type.compare(session, current, data[1]);
View Full Code Here

Examples of org.iq80.leveldb.table.UserComparator.compare()

        InternalKey smallestInternalKey = new InternalKey(smallestUserKey, MAX_SEQUENCE_NUMBER, VALUE);
        int index = findFile(smallestInternalKey);

        UserComparator userComparator = internalKeyComparator.getUserComparator();
        return ((index < files.size()) &&
                userComparator.compare(largestUserKey, files.get(index).getSmallest().getUserKey()) >= 0);
    }

    private int findFile(InternalKey targetKey)
    {
        if (files.size() == 0) {
View Full Code Here

Examples of org.jboss.aesh.comparators.PosixFileNameComparator.compare()

                  new PosixFileNameComparator();

         @Override
         public int compare(TerminalString o1, TerminalString o2)
         {
            return posixFileNameComparator.compare(o1.getCharacters(), o2.getCharacters());
         }
      };

      Collections.sort(display, posixFileNameTerminalComparator);
View Full Code Here

Examples of org.jboss.classloading.spi.version.VersionComparatorRegistry.compare()

      if (version1 == null)
         return;
      VersionComparatorRegistry registry = VersionComparatorRegistry.getInstance();
      if (result < 0)
      {
         assertTrue("Expected " + version1 + ".compareTo(" + version2 + ") to be negative " + registry.compare(version1, version2), registry.compare(version1, version2) < 0);
         assertTrue("Expected " + version2 + ".compareTo(" + version1 + ") to be positive " + registry.compare(version2, version1), registry.compare(version2, version1) > 0);
      }
      else if (result > 0)
      {
         assertTrue("Expected " + version1 + ".compareTo(" + version2 + ") to be positive " + registry.compare(version1, version2), registry.compare(version1, version2) > 0);
View Full Code Here

Examples of org.jboss.ejb3.packagemanager.PackageVersionComparator.compare()

      {
         PersistentPackage installedPackage = this.pkgDatabaseManager.getInstalledPackage(packageName);
         // if the installed package version and the version of the package being upgraded are the same
         // then skip the upgrade
         PackageVersionComparator comparator = new PackageVersionComparator();
         int versionComparison = comparator.compare(installedPackage.getPackageVersion(), pkgContext.getPackageVersion());
         if (versionComparison == 0)
         {
            if (!upgradeOptions.isForceUpgrade())
            {
               logger.info("Skipping package upgrade, since package with name " + packageName + " and version "
View Full Code Here

Examples of org.jboss.metatype.api.values.SimpleValueComparator.compare()

   {
      SimpleValueComparator comparator = new SimpleValueComparator();

      SimpleValue s1 = SimpleValueSupport.wrap("value1");
      SimpleValue s2 = SimpleValueSupport.wrap("value2");
      assertTrue("value1 < value2", comparator.compare(s1, s2) < 0);
      assertTrue("value2 < value1", comparator.compare(s2, s1) > 0);
      assertTrue("value1 < value2", comparator.compare(s1, s1) == 0);

      assertTrue("value1 < value2", s1.compareTo(s2) < 0);
      assertTrue("value2 < value1", s2.compareTo(s1) > 0);
View Full Code Here

Examples of org.jfree.formula.typing.ExtendedComparator.compare()

    {
      throw new EvaluationException(LibFormulaErrorValue.ERROR_NA_VALUE);
    }

    final ExtendedComparator comparator = typeRegistry.getComparator(type1, type2);
    final Integer result = comparator.compare (type1, value1Raw, type2, value2Raw);
    if (result == null)
    {
      throw new EvaluationException
          (LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
    }
View Full Code Here

Examples of org.jibx.extras.DocumentComparator.compare()

        InputStreamReader brdr = new InputStreamReader
            (new ByteArrayInputStream(bos.toByteArray()), enc);
        InputStreamReader frdr = new InputStreamReader
            (new FileInputStream(fin), enc);
        DocumentComparator comp = new DocumentComparator(System.err);
        if (comp.compare(frdr, brdr)) {
            return true;
        } else {
           
            // save file before returning failure
            try {
View Full Code Here

Examples of org.joda.time.DateTimeComparator.compare()

        try {
            //  Loop from start to end, incrementing by the max number of days you can
            //  specify for a given type of query.  This is 1 for burn and sleep, and 31 for steps.
            //@ loop_invariant date.compareTo(userRegistrationDate) >= 0;
            while (comparator.compare(current, end) < 0)
            {
                if (guestService.getApiKey(updateInfo.apiKey.getId())==null) {
                    logger.info("Not updating BodyMedia connector instance with a deleted apiKeyId");
                    return;
                }
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.