Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 156 for Ordering (0.07 sec)

  1. 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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  2. 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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  3. 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;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableSortedMap.java

       */
      private static final Comparator<?> NATURAL_ORDER = Ordering.natural();
    
      private static final ImmutableSortedMap<Comparable<?>, Object> NATURAL_EMPTY_MAP =
          new ImmutableSortedMap<>(
              ImmutableSortedSet.emptySet(Ordering.natural()), ImmutableList.<Object>of());
    
      static <K, V> ImmutableSortedMap<K, V> emptyMap(Comparator<? super K> comparator) {
        if (Ordering.natural().equals(comparator)) {
          return of();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.4K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java

          implements TestSetGenerator<UnhashableObject> {}
    
      private static Ordering<String> createExplicitComparator(String[] elements) {
        // Collapse equal elements, which Ordering.explicit() doesn't support, while
        // maintaining the ordering by first occurrence.
        Set<String> elementsPlus = Sets.newLinkedHashSet();
        elementsPlus.add(BEFORE_FIRST);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  6. compat/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactUtilsTest.java

            assertEquals("1.2.3-20090413X094722-2", ArtifactUtils.toSnapshotVersion("1.2.3-20090413X094722-2"));
        }
    
        /**
         * Tests that the ordering of the map resembles the ordering of the input collection of artifacts.
         */
        @Test
        void testArtifactMapByVersionlessIdOrdering() throws Exception {
            List<Artifact> list = new ArrayList<>();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  7. android/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;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

     * @author Ben Yu
     * @since 12.0
     */
    @GwtIncompatible
    @J2ktIncompatible
    @ElementTypesAreNonnullByDefault
    public final class ArbitraryInstances {
    
      private static final Ordering<Field> BY_FIELD_NAME =
          new Ordering<Field>() {
            @Override
            public int compare(Field left, Field right) {
              return left.getName().compareTo(right.getName());
            }
          };
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  9. 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));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        testComparator(arbitrary, list);
      }
    
      public void testUsingToString() {
        Ordering<Object> ordering = Ordering.usingToString();
        testComparator(ordering, 1, 12, 124, 2);
        assertEquals("Ordering.usingToString()", ordering.toString());
        assertSame(ordering, reserialize(ordering));
      }
    
      // use an enum to get easy serializability
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
Back to top