Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for hasSameComparator (0.16 sec)

  1. android/guava-tests/test/com/google/common/collect/SortedIterablesTest.java

        assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Sets.newTreeSet()));
        // Before JDK6 (including under GWT), the TreeMap keySet is a plain Set.
        if (Maps.newTreeMap().keySet() instanceof SortedSet) {
          assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet()));
        }
        assertTrue(
            SortedIterables.hasSameComparator(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/SortedIterablesTest.java

        assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Sets.newTreeSet()));
        // Before JDK6 (including under GWT), the TreeMap keySet is a plain Set.
        if (Maps.newTreeMap().keySet() instanceof SortedSet) {
          assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet()));
        }
        assertTrue(
            SortedIterables.hasSameComparator(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  3. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

          Comparator<? super E> comparator, Iterable<? extends E> elements, boolean fromSortedSet) {
        checkNotNull(comparator);
    
        boolean hasSameComparator = fromSortedSet || hasSameComparator(elements, comparator);
        if (hasSameComparator && (elements instanceof ImmutableSortedSet)) {
          @SuppressWarnings("unchecked")
          ImmutableSortedSet<E> result = (ImmutableSortedSet<E>) elements;
          boolean isSubset =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/RegularImmutableSortedSet.java

        // graduates from labs.
        if (targets instanceof Multiset) {
          targets = ((Multiset<?>) targets).elementSet();
        }
        if (!SortedIterables.hasSameComparator(comparator(), targets) || (targets.size() <= 1)) {
          return super.containsAll(targets);
        }
    
        /*
         * If targets is a sorted set with the same comparator, containsAll can run
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/SortedIterables.java

      private SortedIterables() {}
    
      /**
       * Returns {@code true} if {@code elements} is a sorted collection using an ordering equivalent to
       * {@code comparator}.
       */
      public static boolean hasSameComparator(Comparator<?> comparator, Iterable<?> elements) {
        checkNotNull(comparator);
        checkNotNull(elements);
        Comparator<?> comparator2;
        if (elements instanceof SortedSet) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 30 10:33:07 UTC 2021
    - 2K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableSortedSet.java

       */
      public static <E> ImmutableSortedSet<E> copyOf(
          Comparator<? super E> comparator, Iterable<? extends E> elements) {
        checkNotNull(comparator);
        boolean hasSameComparator = SortedIterables.hasSameComparator(comparator, elements);
    
        if (hasSameComparator && (elements instanceof ImmutableSortedSet)) {
          @SuppressWarnings("unchecked")
          ImmutableSortedSet<E> original = (ImmutableSortedSet<E>) elements;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

       */
      public static <E> ImmutableSortedSet<E> copyOf(
          Comparator<? super E> comparator, Iterable<? extends E> elements) {
        checkNotNull(comparator);
        boolean hasSameComparator = SortedIterables.hasSameComparator(comparator, elements);
    
        if (hasSameComparator && (elements instanceof ImmutableSortedSet)) {
          @SuppressWarnings("unchecked")
          ImmutableSortedSet<E> original = (ImmutableSortedSet<E>) elements;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.9K bytes
    - Viewed (0)
Back to top