Examples of compare()


Examples of org.richfaces.model.impl.expressive.WrappedBeanComparator2.compare()

                .getRowData());
        // create comparator
        WrappedBeanComparator2 wrappedBeanComparator = new WrappedBeanComparator2(
                (groupFields));
        // compare last and current data
        return (wrappedBeanComparator.compare(wrappedLstD, wrappedActD) != 0);
    }// rowGroupChanged

    public void encodeOneRow(FacesContext context, ExtendedTableHolder holder)
            throws IOException {
        UIExtendedDataTable table = holder.getTable();
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSNumber.compare()

   
    @Test public void testPassOCObject() {
        NSNumber fortyTwo = NSNumber.CLASS.numberWithInt(42);   
        NSNumber e = NSNumber.CLASS.numberWithDouble(Math.E);
       
        assertEquals(-1, e.compare(fortyTwo));
        assertEquals(0, e.compare(e));
        assertEquals(1, fortyTwo.compare(e));
    }
   
    @Test public void testStringMarshalling() {
View Full Code Here

Examples of org.springframework.beans.support.PropertyComparator.compare()

    Dog dog2 = new Dog();
    dog2.setNickName("biscy");

    PropertyComparator c = new PropertyComparator("nickName", false, true);
    assertTrue(c.compare(dog, dog2) > 0);
    assertTrue(c.compare(dog, dog) == 0);
    assertTrue(c.compare(dog2, dog) < 0);
  }

  public void testPropertyComparatorNulls() {
View Full Code Here

Examples of org.springframework.expression.TypeComparator.compare()

    List<?> l = (List<?>) right;
    Object low = l.get(0);
    Object high = l.get(1);
    TypeComparator comparator = state.getTypeComparator();
    try {
      return BooleanTypedValue.forValue((comparator.compare(left, low) >= 0 && comparator.compare(left, high) <= 0));
    } catch (SpelEvaluationException ex) {
      ex.setPosition(getStartPosition());
      throw ex;
    }
  }
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardTypeComparator.compare()

    assertTrue(comparator.compare(1.0f, bdTwo) < 0);
    assertTrue(comparator.compare(1.0f, bdOne) == 0);
    assertTrue(comparator.compare(2.0f, bdOne) > 0);

    assertTrue(comparator.compare(1L, bdTwo) < 0);
    assertTrue(comparator.compare(1L, bdOne) == 0);
    assertTrue(comparator.compare(2L, bdOne) > 0);

  }
View Full Code Here

Examples of org.springframework.ide.eclipse.quickfix.processors.NameSuggestionComparator.compare()

    String name3 = "com.test.Accountsss";
    String name4 = "com.test.Car";
    String name5 = "Account";
   
    NameSuggestionComparator comparator = new NameSuggestionComparator("Account");
    assertEquals("Expects 0 when string are equal", 0, comparator.compare(name1, name1));
    assertTrue(comparator.compare(name1, name2) > 0);
    assertTrue(comparator.compare(name2, name1) < 0);
    assertTrue(comparator.compare(name1, name3) >= 0);
    assertTrue(comparator.compare(name3, name1) <= 0);
    assertTrue(comparator.compare(name2, name3) >= 0);
View Full Code Here

Examples of org.springframework.security.ldap.SpringSecurityLdapTemplate.compare()

        }

        String encodedPassword = passwordEncoder.encodePassword(password, null);
        byte[] passwordBytes = LdapUtils.getUtf8Bytes(encodedPassword);

        if (!ldapTemplate.compare(user.getDn().toString(), passwordAttributeName, passwordBytes)) {
            throw new BadCredentialsException(messages.getMessage("PasswordComparisonAuthenticator.badCredentials",
                    "Bad credentials"));
        }

        return user;
View Full Code Here

Examples of org.syncany.database.FileVersionComparator.compare()

    else if (EnvironmentUtil.isUnixLikeOperatingSystem()) {
      fileVersion.setPosixPermissions("r--rwxrw-");
    }
   
    // Run
    FileVersionComparison fileComparison = versionComparator.compare(fileVersion, somefile, null, true);
   
    // Test
    assertFalse(fileComparison.equals());
    assertTrue(CollectionUtil.containsExactly(fileComparison.getFileChanges(), FileChange.CHANGED_CHECKSUM));
   
View Full Code Here

Examples of org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm.SETRawComparatorTerm.compare()

    SplitEmittedTerm t1 = new SplitEmittedTerm(t, split, flush);
    SETRawComparatorTerm compare = new SETRawComparatorTerm();
    SETRawComparatorTermSplitFlush compare2 = new SETRawComparatorTermSplitFlush();
    assertEquals(0, t1.compareTo(t1));
    assertTrue(t1.equals(t1));
    assertEquals(0, compare.compare(t1, t1));
    assertEquals(0, compare2.compare(t1, t1));
    byte[] t1w = toBytes(t1);
    assertEquals(0, compare.compare(t1w, 0, t1w.length, t1w, 0, t1w.length));
    assertEquals(0, compare2.compare(t1w, 0, t1w.length, t1w, 0, t1w.length));
   
View Full Code Here

Examples of org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm.SETRawComparatorTermSplitFlush.compare()

    SETRawComparatorTerm compare = new SETRawComparatorTerm();
    SETRawComparatorTermSplitFlush compare2 = new SETRawComparatorTermSplitFlush();
    assertEquals(0, t1.compareTo(t1));
    assertTrue(t1.equals(t1));
    assertEquals(0, compare.compare(t1, t1));
    assertEquals(0, compare2.compare(t1, t1));
    byte[] t1w = toBytes(t1);
    assertEquals(0, compare.compare(t1w, 0, t1w.length, t1w, 0, t1w.length));
    assertEquals(0, compare2.compare(t1w, 0, t1w.length, t1w, 0, t1w.length));
   
    SplitEmittedTerm t1a = new SplitEmittedTerm(new String(t), split, flush);
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.