Examples of compare()


Examples of org.apache.axis2.om.impl.llom.util.XMLComparator.compare()

            javax.xml.stream.XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(stream);
            OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null);
            SOAPEnvelope resEnv = (SOAPEnvelope) builder.getDocumentElement();
            OMElement resElementtobe = resEnv.getBody().getFirstElement();
            XMLComparator comparator = new XMLComparator();
            compare = comparator.compare(retEle,resElementtobe);
        }
        return compare;
    }

View Full Code Here

Examples of org.apache.bookkeeper.versioning.Version.compare()

        Version v1 = res.left();

        // read owner info
        toManager.readOwnerInfo(topic, readCallback, null);
        Versioned<HubInfo> hubInfo = readCallback.queue.take().left();
        Assert.assertEquals(Version.Occurred.CONCURRENTLY, v1.compare(hubInfo.getVersion()));
        Assert.assertEquals(owner, hubInfo.getValue());

        HubInfo newOwner = new HubInfo(new HedwigSocketAddress("127.0.0.1", 8008), 1000);

        // write exsited owner info with null version
View Full Code Here

Examples of org.apache.camel.util.ExpressionComparator.compare()

        List<Exchange> list = getReceivedExchanges();
        for (int i = 1; i < list.size(); i++) {
            int j = i - 1;
            Exchange e1 = list.get(j);
            Exchange e2 = list.get(i);
            int result = comparator.compare(e1, e2);
            if (result == 0) {
                fail("Messages not " + type + ". Messages" + j + " and " + i + " are equal with value: " + expression.evaluate(e1) + " for expression: " + expression + ". Exchanges: " + e1 + " and "
                     + e2);
            } else {
                if (!ascending) {
View Full Code Here

Examples of org.apache.cassandra.db.IClock.compare()

    public static void atomicSetMax(AtomicReference<IClock> atomic, IClock newClock)
    {
        while (true)
        {
            IClock oldClock = atomic.get();
            ClockRelationship rel = oldClock.compare(newClock);
            if (rel == ClockRelationship.DISJOINT)
            {
                newClock = oldClock.getSuperset(Arrays.asList(newClock));
            }
            if (rel == ClockRelationship.GREATER_THAN || rel == ClockRelationship.EQUAL
View Full Code Here

Examples of org.apache.cassandra.db.composites.CellNameType.compare()

            int index = IndexHelper.indexFor(name, indexList, comparator, false, lastIndexIdx);
            if (index < 0 || index == indexList.size())
                continue;
            IndexHelper.IndexInfo indexInfo = indexList.get(index);
            // Check the index block does contain the column names and that we haven't inserted this block yet.
            if (comparator.compare(name, indexInfo.firstName) < 0 || index == lastIndexIdx)
                continue;
            ranges.add(indexInfo);
            lastIndexIdx = index;
        }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.compare()

        IColumn current = iter.hasNext() ? iter.next() : null;
        IColumn retain = toRetain.hasNext() ? toRetain.next() : null;
        AbstractType comparator = getComparator();
        while (current != null && retain != null)
        {
            int c = comparator.compare(current.name(), retain.name());
            if (c == 0)
            {
                if (current instanceof SuperColumn)
                {
                    assert retain instanceof SuperColumn;
View Full Code Here

Examples of org.apache.cassandra.db.marshal.TimeUUIDType.compare()

    public void testTimeUUIDType() throws UnknownHostException
    {
        TimeUUIDType comp = TimeUUIDType.instance;
        ByteBuffer first = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.1"))));
        ByteBuffer second = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.1"))));
        assert comp.compare(first, second) < 0;
        assert comp.compare(second, first) > 0;
        ByteBuffer sameAsFirst = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.getUUID(first)));
        assert comp.compare(first, sameAsFirst) == 0;
    }
View Full Code Here

Examples of org.apache.cloudstack.network.contrail.model.VirtualMachineModel.compare()

            } catch (Exception ex) {
                s_logger.warn("update virtual-machine", ex);
            }
        } else {
            //compare
            if (current != null && current.compare(_manager.getModelController(), vmModel) == false) {
                syncLogMsg.append("VM # DB: " + dbVm.getInstanceName() + "; VNC: " + vncVm.getName() + "; attributes differ\n");
                return false;
            }
        }
        return true;
View Full Code Here

Examples of org.apache.commons.collections.comparators.NullComparator.compare()

  public int compare(SbilancioMovimentoContabileControlliIva mc1, SbilancioMovimentoContabileControlliIva mc2) {
   
    // ordino rispetto al codice errore
    NullComparator nullComparator = new NullComparator(false);
    int retval = nullComparator.compare(mc1.getCodiceErrore(), mc2.getCodiceErrore());
    if (retval != 0) {
      return retval;
    }
   
    // poi rispetto al codice tipo protocollo
View Full Code Here

Examples of org.apache.commons.configuration.ConfigurationComparator.compare()

                    Object value2 = list2.get(i);

                    if (value1 instanceof Configuration)
                    {
                        ConfigurationComparator comparator = new StrictConfigurationComparator();
                        assertTrue("The dictionnary at index " + i + " for the key '" + key + "' doesn't match", comparator.compare((Configuration) value1, (Configuration) value2));
                    }
                    else
                    {
                        assertEquals("Element at index " + i + " for the key '" + key + "'", value1, value2);
                    }
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.