Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 140 for Compare (0.16 sec)

  1. android/guava/src/com/google/common/math/IntMath.java

       * Returns {@code b} to the {@code k}th power. Even if the result overflows, it will be equal to
       * {@code BigInteger.valueOf(b).pow(k).intValue()}. This implementation runs in {@code O(log k)}
       * time.
       *
       * <p>Compare {@link #checkedPow}, which throws an {@link ArithmeticException} upon overflow.
       *
       * @throws IllegalArgumentException if {@code k < 0}
       */
      @GwtIncompatible // failing tests
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/LongMath.java

        if (roundArbitrarilyAsLong == Long.MAX_VALUE) {
          /*
           * For most values, the conversion from roundArbitrarily to roundArbitrarilyAsLong is
           * lossless. In that case we can compare x to roundArbitrarily using Longs.compare(x,
           * roundArbitrarilyAsLong). The exception is for values where the conversion to double rounds
           * up to give roundArbitrarily equal to 2^63, so the conversion back to long overflows and
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/TestsForMapsInJavaUtil.java

        return new NullFriendlyComparator<>();
      }
    
      private static final class NullFriendlyComparator<T> implements Comparator<T>, Serializable {
        @Override
        public int compare(T left, T right) {
          return String.valueOf(left).compareTo(String.valueOf(right));
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

      }
    
      @CheckForNull
      E higher(E e) {
        checkNotNull(e);
        Iterator<E> iterator = tailSet(e).iterator();
        while (iterator.hasNext()) {
          E higher = iterator.next();
          if (comparator().compare(e, higher) < 0) {
            return higher;
          }
        }
        return null;
      }
    
      @CheckForNull
      public E ceiling(E e) {
        ImmutableSortedSet<E> set = tailSet(e, true);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/DerivedCollectionGenerators.java

              castOrCopyToList(mapGenerator.order(castOrCopyToList(mapGenerator.getSampleElements(5))));
          sort(
              insertionOrder,
              new Comparator<V>() {
                @Override
                public int compare(V left, V right) {
                  // The indexes are small enough for the subtraction trick to be safe.
                  return indexOfEntryWithValue(left) - indexOfEntryWithValue(right);
                }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  6. maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java

            assertEquals(0, c2.compareTo(c1), "expected " + v2 + " == " + v1);
        }
    
        private void checkVersionsArrayEqual(String[] array) {
            // compare against each other (including itself)
            for (int i = 0; i < array.length; ++i)
                for (int j = i; j < array.length; ++j) checkVersionsEqual(array[i], array[j]);
        }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Tue Jan 09 06:39:47 GMT 2024
    - 14K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/reflect/TypeResolver.java

             * just one problem: Starting with JDK 7u51, the JDK TypeVariable's equals() method doesn't
             * recognize instances of our TypeVariable implementation. This is a problem because users
             * compare TypeVariables from the JDK against TypeVariables returned by TypeResolver. To
             * work with all JDK versions, TypeResolver must return the appropriate TypeVariable
             * implementation in each of the three possible cases:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 24.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/MapsCollectionTest.java

                        Collections.sort(
                            insertionOrder,
                            new Comparator<Entry<String, Integer>>() {
                              @Override
                              public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
                                return o1.getKey().compareTo(o2.getKey());
                              }
                            });
                        return insertionOrder;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 32.2K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/ClassSanityTester.java

            }
          };
    
      private static final Ordering<Invokable<?, ?>> BY_NUMBER_OF_PARAMETERS =
          new Ordering<Invokable<?, ?>>() {
            @Override
            public int compare(Invokable<?, ?> left, Invokable<?, ?> right) {
              return Ints.compare(left.getParameters().size(), right.getParameters().size());
            }
          };
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 08 17:31:55 GMT 2024
    - 33K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/ShortsTest.java

              .isTrue();
        }
      }
    
      public void testCompare() {
        for (short x : VALUES) {
          for (short y : VALUES) {
            // Only compare the sign of the result of compareTo().
            int expected = Short.valueOf(x).compareTo(y);
            int actual = Shorts.compare(x, y);
            if (expected == 0) {
              assertWithMessage(x + ", " + y).that(actual).isEqualTo(expected);
            } else if (expected < 0) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
Back to top