Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 191 for Comparable (1.79 sec)

  1. guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

      @SuppressWarnings("SelfComparison")
      public void testGet_comparable() {
        @SuppressWarnings("unchecked") // The null value can compare with any Object
        Comparable<Object> comparable = ArbitraryInstances.get(Comparable.class);
        assertEquals(0, comparable.compareTo(comparable));
        assertTrue(comparable.compareTo("") > 0);
        assertThrows(NullPointerException.class, () -> comparable.compareTo(null));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Ordering.java

       * a {@link NullPointerException} when passed a null parameter.
       *
       * <p>The type specification is {@code <C extends Comparable>}, instead of the technically correct
       * {@code <C extends Comparable<? super C>>}, to support legacy types from before Java 5.
       *
       * <p><b>Java 8+ users:</b> use {@link Comparator#naturalOrder} instead.
       */
      @GwtCompatible(serializable = true)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

      @Override
      protected <E extends Comparable<? super E>> SortedSet<E> of() {
        return ImmutableSortedSet.of();
      }
    
      @Override
      protected <E extends Comparable<? super E>> SortedSet<E> of(E e) {
        return ImmutableSortedSet.of(e);
      }
    
      @Override
      protected <E extends Comparable<? super E>> SortedSet<E> of(E e1, E e2) {
        return ImmutableSortedSet.of(e1, e2);
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 45.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Comparators.java

       *
       * @param a first value to compare, returned if less than or equal to b.
       * @param b second value to compare.
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
       * @since 30.0
       */
      public static <T extends Comparable<? super T>> T min(T a, T b) {
        return (a.compareTo(b) <= 0) ? a : b;
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/TreeRangeSet.java

    @GwtIncompatible // uses NavigableMap
    @ElementTypesAreNonnullByDefault
    public class TreeRangeSet<C extends Comparable<?>> extends AbstractRangeSet<C>
        implements Serializable {
    
      @VisibleForTesting final NavigableMap<Cut<C>, Range<C>> rangesByLowerBound;
    
      /** Creates an empty {@code TreeRangeSet} instance. */
      public static <C extends Comparable<?>> TreeRangeSet<C> create() {
        return new TreeRangeSet<>(new TreeMap<Cut<C>, Range<C>>());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 32.5K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/CollectCollectors.java

              ImmutableSet.Builder::add,
              ImmutableSet.Builder::combine,
              ImmutableSet.Builder::build);
    
      @GwtIncompatible
      private static final Collector<Range<Comparable<?>>, ?, ImmutableRangeSet<Comparable<?>>>
          TO_IMMUTABLE_RANGE_SET =
              Collector.of(
                  ImmutableRangeSet::builder,
                  ImmutableRangeSet.Builder::add,
                  ImmutableRangeSet.Builder::combine,
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 16:21:40 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  7. src/builtin/builtin.go

    type any = interface{}
    
    // comparable is an interface that is implemented by all comparable types
    // (booleans, numbers, strings, pointers, channels, arrays of comparable types,
    // structs whose fields are all comparable types).
    // The comparable interface may only be used as a type parameter constraint,
    // not as the type of a variable.
    type comparable interface{ comparable }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ContiguousSet.java

     *
     * @author Gregory Kick
     * @since 10.0
     */
    @GwtCompatible(emulated = true)
    @SuppressWarnings("rawtypes") // allow ungenerified Comparable types
    @ElementTypesAreNonnullByDefault
    public abstract class ContiguousSet<C extends Comparable> extends ImmutableSortedSet<C> {
      /**
       * Returns a {@code ContiguousSet} containing the same values in the given domain {@linkplain
       * Range#contains contained} by the range.
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        }
      }
    
      // J2kt cannot translate the Comparable rawtype in a usable way (it becomes Comparable<Object>
      // but types are typically only Comparable to themselves).
      @SuppressWarnings({"rawtypes", "unchecked"})
      private static MinMaxPriorityQueue.Builder<Comparable<?>> rawtypeToWildcard(
          MinMaxPriorityQueue.Builder<Comparable> builder) {
        return (MinMaxPriorityQueue.Builder) builder;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  10. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirPsiTypeProvider.kt

            for (projection in typeArguments) {
                // E.g., Test : Comparable<Test>
                val type = (projection as? ConeKotlinTypeProjection)?.type ?: continue
                // E.g., Comparable<Test>
                val newType = substituteOrNull(type) ?: continue
                // Visit new type: e.g., Test, as a type argument, is substituted with Comparable<Test>, again.
                if (newType.hasRecursiveTypeArgument(visited)) return true
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Fri Apr 12 13:29:57 GMT 2024
    - 18.6K bytes
    - Viewed (0)
Back to top