Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 378 for Ordering (0.17 sec)

  1. android/guava/src/com/google/common/collect/Ordering.java

      @Deprecated
      public static <T extends @Nullable Object> Ordering<T> from(Ordering<T> ordering) {
        return checkNotNull(ordering);
      }
    
      /**
       * Returns an ordering that compares objects according to the order in which they appear in the
       * given list. Only objects present in the list (according to {@link Object#equals}) may be
       * compared. This comparator imposes a "partial ordering" over the type {@code T}. Subsequent
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/GeneralRangeTest.java

          GeneralRange<@Nullable Integer> range = GeneralRange.downTo(ORDERING, 3, lBoundType);
          for (Integer i : IN_ORDER_VALUES) {
            assertEquals(
                ORDERING.compare(i, 3) > 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == CLOSED),
                range.contains(i));
            assertEquals(
                ORDERING.compare(i, 3) < 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == OPEN),
                range.tooLow(i));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/NullsLastOrdering.java

    /** An ordering that treats {@code null} as greater than all other values. */
    @GwtCompatible(serializable = true)
    @ElementTypesAreNonnullByDefault
    final class NullsLastOrdering<T extends @Nullable Object> extends Ordering<@Nullable T>
        implements Serializable {
      final Ordering<? super T> ordering;
    
      NullsLastOrdering(Ordering<? super T> ordering) {
        this.ordering = ordering;
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Mar 27 16:03:47 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ByFunctionOrdering.java

      ByFunctionOrdering(Function<F, ? extends T> function, Ordering<T> ordering) {
        this.function = checkNotNull(function);
        this.ordering = checkNotNull(ordering);
      }
    
      @Override
      public int compare(@ParametricNullness F left, @ParametricNullness F right) {
        return ordering.compare(function.apply(left), function.apply(right));
      }
    
      @Override
      public boolean equals(@CheckForNull Object object) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sun Jun 20 14:22:42 GMT 2021
    - 2.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/GeneralRangeTest.java

          GeneralRange<@Nullable Integer> range = GeneralRange.downTo(ORDERING, 3, lBoundType);
          for (Integer i : IN_ORDER_VALUES) {
            assertEquals(
                ORDERING.compare(i, 3) > 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == CLOSED),
                range.contains(i));
            assertEquals(
                ORDERING.compare(i, 3) < 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == OPEN),
                range.tooLow(i));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java

          }
        }
        return dummy;
      }
    
      @Benchmark
      int ordering(int reps) {
        int dummy = 0;
        if (mutable) {
          for (int i = 0; i < reps; i++) {
            dummy += ORDERING.sortedCopy(input).get(0);
          }
        } else {
          for (int i = 0; i < reps; i++) {
            dummy += ORDERING.immutableSortedCopy(input).get(0);
          }
        }
        return dummy;
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

        assertEquals(tree, copyFromTree);
        assertSame(Ordering.natural(), copyFromTree.keyComparator());
        assertSame(Ordering.natural(), copyFromTree.valueComparator());
        assertSame(Ordering.natural(), copyFromTree.get(1.0).comparator());
      }
    
      /** Test that creating one TreeMultimap from a non-TreeMultimap results in natural ordering. */
      public void testCreateFromHashMultimap() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ImmutableTableTest.java

        table.put('b', 1, "bar");
        table.put('a', 2, "baz");
        validateTableCopies(table);
        // Even though rowKeySet, columnKeySet, and cellSet have the same
        // iteration ordering, row has an inconsistent ordering.
        assertThat(table.row('b').keySet()).containsExactly(1, 2).inOrder();
        assertThat(ImmutableTable.copyOf(table).row('b').keySet()).containsExactly(2, 1).inOrder();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 19.6K bytes
    - Viewed (0)
  9. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

          K k1, V v1, K k2, V v2) {
        return new Builder<K, V>(Ordering.natural()).put(k1, v1).put(k2, v2).build();
      }
    
      public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(
          K k1, V v1, K k2, V v2, K k3, V v3) {
        return new Builder<K, V>(Ordering.natural()).put(k1, v1).put(k2, v2).put(k3, v3).build();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/TreeMultimap.java

     * according to the key comparator ordering or the natural ordering of the keys. Similarly, {@code
     * get}, {@code removeAll}, and {@code replaceValues} return collections that iterate through the
     * values according to the value comparator ordering or the natural ordering of the values. The
     * collections generated by {@code entries}, {@code keys}, and {@code values} iterate across the
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Mar 09 00:21:17 GMT 2024
    - 8.7K bytes
    - Viewed (0)
Back to top