Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 208 for Compare (0.23 sec)

  1. guava/src/com/google/common/collect/ComparisonChain.java

            public ComparisonChain compare(int left, int right) {
              return classify(Ints.compare(left, right));
            }
    
            @Override
            public ComparisonChain compare(long left, long right) {
              return classify(Longs.compare(left, right));
            }
    
            @Override
            public ComparisonChain compare(float left, float right) {
              return classify(Float.compare(left, right));
            }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Sep 21 17:28:11 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Ordering.java

       * instead (but note that it does not guarantee which tied minimum element is returned).
       *
       * @param a value to compare, returned if less than or equal to the rest.
       * @param b value to compare
       * @param c value to compare
       * @param rest values to compare
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i> under this
       *     ordering.
       */
      @ParametricNullness
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Comparators.java

       * @param b second value to compare.
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i> using the given
       *     comparator.
       * @since 30.0
       */
      @ParametricNullness
      public static <T extends @Nullable Object> T max(
          @ParametricNullness T a, @ParametricNullness T b, Comparator<T> comparator) {
        return (comparator.compare(a, b) >= 0) ? a : b;
      }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/SortedLists.java

      /**
       * A specification for which index to return if the list contains at least one element that
       * compares as equal to the key.
       */
      enum KeyPresentBehavior {
        /**
         * Return the index of any list element that compares as equal to the key. No guarantees are
         * made as to which index is returned, if more than one element compares as equal to the key.
         */
        ANY_PRESENT {
          @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/UnsignedLongs.java

        return a ^ Long.MIN_VALUE;
      }
    
      /**
       * Compares the two specified {@code long} values, treating them as unsigned values between {@code
       * 0} and {@code 2^64 - 1} inclusive.
       *
       * <p><b>Java 8+ users:</b> use {@link Long#compareUnsigned(long, long)} instead.
       *
       * @param a the first unsigned {@code long} to compare
       * @param b the second unsigned {@code long} to compare
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

      public void testCompare() {
        // max value
        assertThat(UnsignedLongs.compare(0, 0xffffffffffffffffL)).isLessThan(0);
        assertThat(UnsignedLongs.compare(0xffffffffffffffffL, 0)).isGreaterThan(0);
    
        // both with high bit set
        assertThat(UnsignedLongs.compare(0xff1a618b7f65ea12L, 0xffffffffffffffffL)).isLessThan(0);
        assertThat(UnsignedLongs.compare(0xffffffffffffffffL, 0xff1a618b7f65ea12L)).isGreaterThan(0);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/UnsignedBytes.java

      }
    
      /**
       * Compares the two specified {@code byte} values, treating them as unsigned values between 0 and
       * 255 inclusive. For example, {@code (byte) -127} is considered greater than {@code (byte) 127}
       * because it is seen as having the value of positive {@code 129}.
       *
       * @param a the first {@code byte} to compare
       * @param b the second {@code byte} to compare
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 18.3K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

            assertTrue(
                comparator + ".compare(" + lesser + ", " + t + ")", comparator.compare(lesser, t) < 0);
          }
    
          assertEquals(comparator + ".compare(" + t + ", " + t + ")", 0, comparator.compare(t, t));
    
          for (int j = i + 1; j < valuesInExpectedOrder.size(); j++) {
            T greater = valuesInExpectedOrder.get(j);
            assertTrue(
                comparator + ".compare(" + greater + ", " + t + ")",
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/Helpers.java

            assertTrue(
                comparator + ".compare(" + lesser + ", " + t + ")", comparator.compare(lesser, t) < 0);
          }
    
          assertEquals(comparator + ".compare(" + t + ", " + t + ")", 0, comparator.compare(t, t));
    
          for (int j = i + 1; j < valuesInExpectedOrder.size(); j++) {
            T greater = valuesInExpectedOrder.get(j);
            assertTrue(
                comparator + ".compare(" + greater + ", " + t + ")",
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/GeneralRange.java

         */
        if (hasLowerBound) {
          int unused =
              comparator.compare(
                  uncheckedCastNullableTToT(lowerEndpoint), uncheckedCastNullableTToT(lowerEndpoint));
        }
        if (hasUpperBound) {
          int unused =
              comparator.compare(
                  uncheckedCastNullableTToT(upperEndpoint), uncheckedCastNullableTToT(upperEndpoint));
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.8K bytes
    - Viewed (0)
Back to top