Examples of compare()


Examples of java.util.Comparator.compare()

         *         specified attribute object
   */
  public boolean equals(Object o) {
      if (o instanceof Name) {
    Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
    return c.compare(name, ((Name)o).name) == 0;
      } else {
    return false;
      }
  }
     
View Full Code Here

Examples of javax.xml.datatype.XMLGregorianCalendar.compare()

                    return true;
                }
            }

            if (notOnOrAfter != null) {
                int val = notOnOrAfter.compare(now);
                if (val != DatatypeConstants.GREATER) {
                    return true;
                }
            }
View Full Code Here

Examples of liquibase.diff.ObjectDifferences.compare()

        exclude.add("uniqueConstraints");
        exclude.add("primaryKey");
        exclude.add("columns");

        ObjectDifferences differences = chain.findDifferences(databaseObject1, databaseObject2, accordingTo, compareControl, exclude);
        differences.compare("name", databaseObject1, databaseObject2, new ObjectDifferences.DatabaseObjectNameCompareFunction(Table.class, accordingTo));

        return differences;
    }
}
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator.compare()

            while (it0.hasNext()) {
              if (!it1.hasNext())
                return -1;
              final Triple t0 = it0.next();
              final Triple t1 = it1.next();
              final int compare = tc.compare(t0, t1);
              if (compare != 0)
                return compare;
            }
            if (it1.hasNext())
              return 1;
View Full Code Here

Examples of net.sf.robocode.util.AlphanumericComparator.compare()

  private static int compare(String p1, String c1, String v1, String p2, String c2, String v2) {
    AlphanumericComparator alphaNumComparator = new AlphanumericComparator();

    // Compare packages
    int result = alphaNumComparator.compare(p1, p2);

    if (result != 0) {
      return result;
    }
View Full Code Here

Examples of net.sf.saxon.sort.AtomicComparer.compare()

        }
        arg1 = arg1.getPrimitiveValue();

        AtomicComparer collator = getAtomicComparer(2, context);

        int result = collator.compare(arg0, arg1);
        if (result < 0) {
            return IntegerValue.MINUS_ONE;
        } else if (result > 0) {
            return IntegerValue.PLUS_ONE;
        } else {
View Full Code Here

Examples of net.sf.saxon.sort.GlobalOrderComparer.compare()

            if (item instanceof NodeInfo) {
                NodeInfo node = (NodeInfo)item;
                if (first==null) {
                    first = node;
                } else {
                    if (comparer.compare(node, first) < 0) {
                        first = node;
                    }
                }
            } else {
                XPathException e = new XPathException("Operand of leading() contains an item that is not a node");
View Full Code Here

Examples of net.sf.saxon.sort.LocalOrderComparer.compare()

                    // not ideal for performance, but it's very unusual to have more than
                    // one key definition for a key.
                    LocalOrderComparer comparer = LocalOrderComparer.getInstance();
                    boolean found = false;
                    for (int i=0; i<nodes.size(); i++) {
                        int d = comparer.compare(curr, nodes.get(i));
                        if (d<=0) {
                            if (d==0) {
                                // node already in list; do nothing
                            } else {
                                // add the node at this position
View Full Code Here

Examples of net.sf.uadetector.internal.util.AlphanumComparator.compare()

      result = -1;
    } else {
      Check.notNull(other.getGroups(), "other.getGroups()");
      final int length = groups.size() < other.getGroups().size() ? groups.size() : other.getGroups().size();
      final AlphanumComparator comparator = new AlphanumComparator();
      result = comparator.compare(toVersionString(groups.subList(0, length)), toVersionString(other.getGroups().subList(0, length)));
      if (result == 0) {
        result = groups.size() > other.getGroups().size() ? 1 : groups.size() < other.getGroups().size() ? -1 : 0;
      }
      if (result == 0) {
        result = extension.compareTo(other.getExtension());
View Full Code Here

Examples of net.yacy.kelondro.order.ByteOrder.compare()

        int c;
        if (mi.hasNext() && si.hasNext()) {
            byte[] mobj = mi.next();
            byte[] sobj = si.next();
            while (true) {
                c = comp.compare(mobj, sobj);
                if (c < 0) {
                    if (mi.hasNext()) mobj = mi.next(); else break;
                } else if (c > 0) {
                    if (si.hasNext()) sobj = si.next(); else break;
                } else {
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.