Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for greatestOf (0.04 sec)

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

        /*
         * If greatestOf() promised to be implemented as reverse().leastOf(), this
         * test would be enough. It doesn't... but we'll cheat and act like it does
         * anyway. There's a comment there to remind us to fix this if we change it.
         */
        List<Integer> list = asList(3, 1, 3, 2, 4, 2, 4, 3);
        assertEquals(asList(4, 4, 3, 3), numberOrdering.greatestOf(list, 4));
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Oct 10 23:13:45 UTC 2025
    - 42.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/OrderingTest.java

        /*
         * If greatestOf() promised to be implemented as reverse().leastOf(), this
         * test would be enough. It doesn't... but we'll cheat and act like it does
         * anyway. There's a comment there to remind us to fix this if we change it.
         */
        List<Integer> list = asList(3, 1, 3, 2, 4, 2, 4, 3);
        assertEquals(asList(4, 4, 3, 3), numberOrdering.greatestOf(list, 4));
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Oct 10 23:13:45 UTC 2025
    - 42.8K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Ordering.java

       * thisComparator))} instead.
       *
       * @return an immutable {@code RandomAccess} list of the {@code k} greatest elements in
       *     <i>descending order</i>
       * @throws IllegalArgumentException if {@code k} is negative
       * @since 8.0
       */
      public <E extends T> List<E> greatestOf(Iterable<E> iterable, int k) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 39.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/SignedBytesTest.java

                new byte[] {LEAST, (byte) 1},
                new byte[] {(byte) 1},
                new byte[] {(byte) 1, LEAST},
                new byte[] {GREATEST, GREATEST - (byte) 1},
                new byte[] {GREATEST, GREATEST},
                new byte[] {GREATEST, GREATEST, GREATEST});
    
        Comparator<byte[]> comparator = SignedBytes.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/ShortsTest.java

                new short[] {LEAST, (short) 1},
                new short[] {(short) 1},
                new short[] {(short) 1, LEAST},
                new short[] {GREATEST, GREATEST - (short) 1},
                new short[] {GREATEST, GREATEST},
                new short[] {GREATEST, GREATEST, GREATEST});
    
        Comparator<short[]> comparator = Shorts.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 27.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/TopKSelector.java

       * Returns a {@code TopKSelector} that collects the greatest {@code k} elements added to it,
       * relative to the natural ordering of the elements, and returns them via {@link #topK} in
       * descending order.
       *
       * @throws IllegalArgumentException if {@code k < 0} or {@code k > Integer.MAX_VALUE / 2}
       */
      public static <T extends Comparable<? super T>> TopKSelector<T> greatest(int k) {
        return greatest(k, Ordering.natural());
      }
    
      /**
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sun Aug 31 13:15:26 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

                new int[] {LEAST, (int) 1L},
                new int[] {(int) 1L},
                new int[] {(int) 1L, LEAST},
                new int[] {GREATEST, (GREATEST - (int) 1L)},
                new int[] {GREATEST, GREATEST},
                new int[] {GREATEST, GREATEST, GREATEST});
    
        Comparator<int[]> comparator = UnsignedInts.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

                new byte[] {LEAST, (byte) 1},
                new byte[] {(byte) 1},
                new byte[] {(byte) 1, LEAST},
                new byte[] {GREATEST, GREATEST - (byte) 1},
                new byte[] {GREATEST, GREATEST},
                new byte[] {GREATEST, GREATEST, GREATEST});
    
        // The VarHandle, Unsafe, or Java implementation.
        Comparator<byte[]> comparator = UnsignedBytes.lexicographicalComparator();
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/IntsTest.java

                new int[] {LEAST, (int) 1},
                new int[] {(int) 1},
                new int[] {(int) 1, LEAST},
                new int[] {GREATEST, GREATEST - (int) 1},
                new int[] {GREATEST, GREATEST},
                new int[] {GREATEST, GREATEST, GREATEST});
    
        Comparator<int[]> comparator = Ints.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
      @J2ktIncompatible
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 29.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/CharsTest.java

                new char[] {LEAST, (char) 1},
                new char[] {(char) 1},
                new char[] {(char) 1, LEAST},
                new char[] {GREATEST, GREATEST - (char) 1},
                new char[] {GREATEST, GREATEST},
                new char[] {GREATEST, GREATEST, GREATEST});
    
        Comparator<char[]> comparator = Chars.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
      }
    
      @J2ktIncompatible
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 25.9K bytes
    - Viewed (0)
Back to top