Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 456 for compareTo (0.11 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/SortedMapNavigationTester.java

                @Override
                public int compare(K o1, K o2) {
                  return ((Comparable) o1).compareTo(o2);
                }
              };
        }
        Iterator<Entry<K, V>> entryItr = navigableMap.entrySet().iterator();
        Entry<K, V> prevEntry = entryItr.next();
        while (entryItr.hasNext()) {
          Entry<K, V> nextEntry = entryItr.next();
          assertTrue(comparator.compare(prevEntry.getKey(), nextEntry.getKey()) < 0);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java

      }
    
      // needed because otherwise Object.toString() calls hashCode()
      @Override
      public String toString() {
        return "DontHashMe" + value;
      }
    
      @Override
      public int compareTo(UnhashableObject o) {
        return (this.value < o.value) ? -1 : (this.value > o.value) ? 1 : 0;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Apr 20 11:19:03 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        assertThat(reverse).isNotNull();
      }
    
      public void testBuilderAsymptotics() {
        int[] compares = {0};
        Comparator<Integer> countingComparator =
            (i, j) -> {
              compares[0]++;
              return i.compareTo(j);
            };
        ImmutableSortedSet.Builder<Integer> builder =
            new ImmutableSortedSet.Builder<Integer>(countingComparator, 10);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/util/concurrent/AbstractService.java

          return state().compareTo(RUNNING) >= 0;
        }
      }
    
      private final Guard isStopped = new IsStoppedGuard();
    
      @WeakOuter
      private final class IsStoppedGuard extends Guard {
        IsStoppedGuard() {
          super(AbstractService.this.monitor);
        }
    
        @Override
        public boolean isSatisfied() {
          return state().compareTo(TERMINATED) >= 0;
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 18:32:03 UTC 2023
    - 20.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ComparatorsTest.java

        }
    
        @Override
        public boolean equals(@Nullable Object o) {
          return (o instanceof Foo) && ((Foo) o).value.equals(value);
        }
    
        @Override
        public int compareTo(Foo other) {
          return value.compareTo(other.value);
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ReverseNaturalOrdering.java

      static final ReverseNaturalOrdering INSTANCE = new ReverseNaturalOrdering();
    
      @Override
      public int compare(Comparable<?> left, Comparable<?> right) {
        checkNotNull(left); // right null is caught later
        if (left == right) {
          return 0;
        }
    
        return ((Comparable<Object>) right).compareTo(left);
      }
    
      @Override
      public <S extends Comparable<?>> Ordering<S> reverse() {
        return Ordering.natural();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun Jun 20 14:22:42 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/ServiceTest.java

        assertLessThan(RUNNING, FAILED);
    
        assertLessThan(STOPPING, FAILED);
        assertLessThan(STOPPING, TERMINATED);
      }
    
      private static <T extends Comparable<? super T>> void assertLessThan(T a, T b) {
        if (a.compareTo(b) >= 0) {
          fail(String.format(Locale.ROOT, "Expected %s to be less than %s", a, b));
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 1.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/FauxveridesTest.java

        @Override
        public String toString() {
          return rootLocaleFormat("%s%s(%s)", typeSignature, name, getTypesString(parameterTypes));
        }
    
        @Override
        public int compareTo(MethodSignature o) {
          return toString().compareTo(o.toString());
        }
      }
    
      private static final class TypeSignature {
        final List<TypeParameterSignature> parameterSignatures;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/FauxveridesTest.java

        @Override
        public String toString() {
          return rootLocaleFormat("%s%s(%s)", typeSignature, name, getTypesString(parameterTypes));
        }
    
        @Override
        public int compareTo(MethodSignature o) {
          return toString().compareTo(o.toString());
        }
      }
    
      private static final class TypeSignature {
        final List<TypeParameterSignature> parameterSignatures;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/Service.java

       * The lifecycle states of a service.
       *
       * <p>The ordering of the {@link State} enum is defined such that if there is a state transition
       * from {@code A -> B} then {@code A.compareTo(B) < 0}. N.B. The converse is not true, i.e. if
       * {@code A.compareTo(B) < 0} then there is <b>not</b> guaranteed to be a valid state transition
       * {@code A -> B}.
       *
       * @since 9.0 (in 1.0 as {@code com.google.common.base.Service.State})
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 12.1K bytes
    - Viewed (0)
Back to top