Examples of compare()


Examples of com.foundationdb.server.collation.AkCollator.compare()

        private boolean eqP(ValueSource x, ValueSource y, TInstance type)
        {
            if (type.typeClass() instanceof TString) {
                AkCollator collator = TString.getCollator(type);
                if (collator != null) {
                    return collator.compare(x, y) == 0;
                }
            }
            return ValueSources.areEqual(x, y);
        }
View Full Code Here

Examples of com.foundationdb.server.types.TComparison.compare()

        for(int i = 0; (c == 0) && (i < count); ++i, li++, ri++) {
            TComparison comp = comparisons.get(i);
            if(comp == null) {
                c = left.compareTo(right, li, ri, 1);
            } else {
                c = comp.compare(lType.typeAt(li), left.value(li), rType.typeAt(ri), right.value(ri));
            }
        }
        return c;
    }
    @Override
View Full Code Here

Examples of com.google.common.collect.ComparisonChain.compare()

    public static <T> int compare(T p, T q, String propertyNames) {
        ComparisonChain chain = ComparisonChain.start();
        for (final Clause clause : iterable(propertyNames)) {
            final Comparable<T> propertyValue = (Comparable<T>) clause.getValueOf(p);
            final Comparable<T> propertyValue2 = (Comparable<T>) clause.getValueOf(q);
            chain = chain.compare(propertyValue, propertyValue2, clause.getDirection().getOrdering());
        }
        return chain.result();
    }

    public static <T> Comparator<T> compareBy(final String propertyNames){
View Full Code Here

Examples of com.google.dexmaker.Code.compare()

            code.iget(handlerField, localHandler, localThis);

            // if (proxy == null)
            code.loadConstant(nullHandler, null);
            Label handlerNullCase = new Label();
            code.compare(Comparison.EQ, handlerNullCase, nullHandler, localHandler);

            // This code is what we execute when we have a valid proxy: delegate to invocation
            // handler.
            for (int p = 0; p < argTypes.length; ++p) {
                code.loadConstant(intValue, p);
View Full Code Here

Examples of com.googlecode.openbeans.Statement.MethodComparator.compare()

      Method chosenOne = matchMethods.get(0);
      matchMethods.remove(0);
      int methodCounter = 1;
      for (Method method : matchMethods)
      {
        int difference = comparator.compare(chosenOne, method);
        if (difference > 0)
        {
          chosenOne = method;
          methodCounter = 1;
        }
View Full Code Here

Examples of com.hazelcast.map.MapService.compare()

    public boolean remove(Object key, Object value) {
        checkTransactionState();
        TxnValueWrapper wrapper = txMap.get(key);

        MapService service = getService();
        if (wrapper != null && !service.compare(name, wrapper.value, value)) {
            return false;
        }
        boolean removed = removeIfSameInternal(service.toData(key, partitionStrategy), value);
        if (removed) {
            txMap.put(key, new TxnValueWrapper(value, TxnValueWrapper.Type.REMOVED));
View Full Code Here

Examples of com.hazelcast.map.MapServiceContext.compare()

        checkTransactionState();
        TxnValueWrapper wrapper = txMap.get(key);

        MapService service = getService();
        final MapServiceContext mapServiceContext = service.getMapServiceContext();
        if (wrapper != null && !mapServiceContext.compare(name, wrapper.value, value)) {
            return false;
        }
        boolean removed = removeIfSameInternal(mapServiceContext.toData(key, partitionStrategy), value);
        if (removed) {
            txMap.put(key, new TxnValueWrapper(value, TxnValueWrapper.Type.REMOVED));
View Full Code Here

Examples of com.hazelcast.map.impl.MapServiceContext.compare()

        checkTransactionState();
        TxnValueWrapper wrapper = txMap.get(key);

        MapService service = getService();
        final MapServiceContext mapServiceContext = service.getMapServiceContext();
        if (wrapper != null && !mapServiceContext.compare(name, wrapper.value, value)) {
            return false;
        }
        boolean removed = removeIfSameInternal(mapServiceContext.toData(key, partitionStrategy), value);
        if (removed) {
            txMap.put(key, new TxnValueWrapper(value, TxnValueWrapper.Type.REMOVED));
View Full Code Here

Examples of com.hp.hpl.jena.datatypes.xsd.XSDDuration.compare()

        Literal d1 = m.createTypedLiteral("PT1H1M1S", XSDDatatype.XSDduration);
        Literal d2 = m.createTypedLiteral("PT1H1M1.1S", XSDDatatype.XSDduration);
        assertTrue("duration compare", !d1.sameValueAs(d2));
        XSDDuration dur1 = (XSDDuration)d1.getValue() ;
        XSDDuration dur2 = (XSDDuration)d2.getValue() ;
        assertEquals("duration compare order", 1, dur2.compare(dur1)) ;
       
        // dateTime
        l1 = m.createTypedLiteral("1999-05-31T02:09:32Z", XSDDatatype.XSDdateTime);
        XSDDateTime xdt = (XSDDateTime)l1.getValue();
        assertEquals("dateTime data type", XSDDatatype.XSDdateTime, l1.getDatatype());
View Full Code Here

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

        try {
          name2 = ((ParameterizedCommand) o2).getName();
        } catch (NotDefinedException e) {
          return 1;
        }
        int rc = collator.compare(name1, name2);
        if (rc != 0) {
          return rc;
        }

        String id1 = ((ParameterizedCommand) o1).getId();
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.