Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for Compare (0.21 sec)

  1. android/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<? super T> comparator) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

        // Pretend the comparator can compare anything. If it turns out it can't
        // compare a and b, we should get a CCE or NPE on the subsequent line. Only methods
        // that are spec'd to throw CCE and NPE should call this.
        @SuppressWarnings({"unchecked", "nullness"})
        Comparator<@Nullable Object> unsafeComparator = (Comparator<@Nullable Object>) comparator;
        return unsafeComparator.compare(a, b);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  3. istioctl/pkg/waypoint/waypoint.go

    				return nil
    			}
    			w := new(tabwriter.Writer).Init(writer, 0, 8, 5, ' ', 0)
    			slices.SortFunc(gws.Items, func(i, j gateway.Gateway) int {
    				if r := cmp.Compare(i.Namespace, j.Namespace); r != 0 {
    					return r
    				}
    				return cmp.Compare(i.Name, j.Name)
    			})
    			filteredGws := make([]gateway.Gateway, 0)
    			for _, gw := range gws.Items {
    				if gw.Spec.GatewayClassName != constants.WaypointGatewayClassName {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 16:16:40 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

              for (int i = 0; i < size; i++) {
                // We're careful to put only K instances in.
                if (i > 0 && comparator.compare((K) sortedKeys[i - 1], (K) sortedKeys[i]) == 0) {
                  throw new IllegalArgumentException(
                      "keys required to be distinct but compared as equal: "
                          + sortedKeys[i - 1]
                          + " and "
                          + sortedKeys[i]);
                }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

     * Comparator} or {@link Comparable} type whose comparison behavior is <i>inconsistent with
     * equals</i>. That is, {@code a.compareTo(b)} or {@code comparator.compare(a, b)} should equal zero
     * <i>if and only if</i> {@code a.equals(b)}. If this advice is not followed, the resulting
     * collection will not correctly obey its specification.
     *
     * <p>See the Guava User Guide article on <a href=
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 35.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableList.java

      }
    
      /**
       * Returns an immutable list containing the given elements, sorted according to their natural
       * order. The sorting algorithm used is stable, so elements that compare as equal will stay in the
       * order in which they appear in the input.
       *
       * <p>If your data has no duplicates, or you wish to deduplicate elements, use {@code
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableBiMap.java

        }
    
        /**
         * Configures this {@code Builder} to order entries by value according to the specified
         * comparator.
         *
         * <p>The sort order is stable, that is, if two entries have values that compare as equivalent,
         * the entry that was inserted first will be first in the built map's iteration order.
         *
         * @throws IllegalStateException if this method was already called
         * @since 19.0
         */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  8. analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KtFe10CallResolver.kt

                null -> emptyList()
            }
        }
    
        private fun KtCallInfo?.toKtCallCandidateInfos(bestCandidateDescriptors: Set<CallableDescriptor>): List<KtCallCandidateInfo> {
            // TODO: We should prefer to compare symbols instead of descriptors, but we can't do so while symbols are not cached.
            fun KtCall.isInBestCandidates(): Boolean {
                val descriptor = this.safeAs<KtFunctionCall<*>>()?.descriptor as? CallableDescriptor
    Plain Text
    - Registered: Fri May 03 08:18:13 GMT 2024
    - Last Modified: Mon Apr 29 12:48:54 GMT 2024
    - 34.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        private final int value;
    
        ClassWithTerribleHashCode(int value) {
          this.value = value;
        }
    
        @Override
        public int compareTo(ClassWithTerribleHashCode that) {
          return Integer.compare(this.value, that.value);
        }
    
        @Override
        public boolean equals(@Nullable Object x) {
          return x instanceof ClassWithTerribleHashCode
              && ((ClassWithTerribleHashCode) x).value == value;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 14:39:16 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Multisets.java

      }
    
      private static final class DecreasingCount implements Comparator<Entry<?>> {
        static final Comparator<Entry<?>> INSTANCE = new DecreasingCount();
    
        @Override
        public int compare(Entry<?> entry1, Entry<?> entry2) {
          return entry2.getCount() - entry1.getCount(); // subtracting two nonnegative integers
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
Back to top