Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  2. 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(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  3. android/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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 30 10:33:07 GMT 2021
    - 2K bytes
    - Viewed (0)
  4. 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 =
    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. android/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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K 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;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 38.5K 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;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 36.7K bytes
    - Viewed (0)
Back to top