Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 456 for compareTo (0.09 sec)

  1. compat/maven-artifact/src/test/java/org/apache/maven/artifact/DefaultArtifactTest.java

            assertTrue(artifact1.compareTo(artifact2) < 0);
            assertTrue(artifact2.compareTo(artifact1) > 0);
    
            Artifact artifact = new DefaultArtifact(
                    groupId, artifactId, VersionRange.createFromVersion("5.0"), scope, type, classifier, artifactHandler);
            assertTrue(artifact.compareTo(artifact1) == 0);
            assertTrue(artifact1.compareTo(artifact) == 0);
        }
    
        @Test
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Cut.java

        private BelowAll() {
          /*
           * No code ever sees this bogus value for `endpoint`: This class overrides both methods that
           * use the `endpoint` field, compareTo() and endpoint(). Additionally, the main implementation
           * of Cut.compareTo checks for belowAll before reading accessing `endpoint` on another Cut
           * instance.
           */
          super("");
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableSortedSet.java

        // Pretend the comparator can compare anything. If it turns out it can't
        // compare a and b, we should get a CCE or NPE on the subsequent line. Only methods
        // that are spec'd to throw CCE and NPE should call this.
        @SuppressWarnings({"unchecked", "nullness"})
        Comparator<@Nullable Object> unsafeComparator = (Comparator<@Nullable Object>) comparator;
        return unsafeComparator.compare(a, b);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

     */
    inline fun binarySearch(
      position: Int,
      limit: Int,
      compare: (Int) -> Int,
    ): Int {
      // Do the binary searching bit.
      var low = position
      var high = limit - 1
      while (low <= high) {
        val mid = (low + high) / 2
        val compareResult = compare(mid)
        when {
          compareResult < 0 -> high = mid - 1
          compareResult > 0 -> low = mid + 1
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Apr 02 11:39:58 UTC 2024
    - 9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/graph/ElementOrderTest.java

          implements Comparable<NonComparableSuperClass> {
    
        ComparableSubClass(Integer value) {
          super(value);
        }
    
        @Override
        public int compareTo(NonComparableSuperClass other) {
          return value.compareTo(other.value);
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  6. compat/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java

        }
    
        private void assertVersionOlder(String left, String right) {
            assertTrue(
                    newArtifactVersion(left).compareTo(newArtifactVersion(right)) < 0,
                    left + " should be older than " + right);
            assertTrue(
                    newArtifactVersion(right).compareTo(newArtifactVersion(left)) > 0,
                    right + " should be newer than " + left);
        }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/DoubleMathTest.java

        BigInteger maxDoubleValue = BigDecimal.valueOf(Double.MAX_VALUE).toBigInteger();
        assertTrue(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL).compareTo(maxDoubleValue) <= 0);
        assertTrue(
            BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL + 1).compareTo(maxDoubleValue) > 0);
      }
    
      public void testConstantsEverySixteenthFactorial() {
        for (int i = 0, n = 0; n <= DoubleMath.MAX_FACTORIAL; i++, n += 16) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  8. compat/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java

                        || res2.getUpperBound() == null
                        || res1.getLowerBound().compareTo(res2.getUpperBound()) <= 0) {
                    if (res1.getUpperBound() == null
                            || res2.getLowerBound() == null
                            || res1.getUpperBound().compareTo(res2.getLowerBound()) >= 0) {
                        ArtifactVersion lower;
                        ArtifactVersion upper;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 19K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

        BigInteger min = BigInteger.ZERO;
        BigInteger max = UnsignedLong.MAX_VALUE.bigIntegerValue();
        for (BigInteger big : TEST_BIG_INTEGERS) {
          boolean expectSuccess = big.compareTo(min) >= 0 && big.compareTo(max) <= 0;
          try {
            assertThat(UnsignedLong.valueOf(big).bigIntegerValue()).isEqualTo(big);
            assertThat(expectSuccess).isTrue();
          } catch (IllegalArgumentException e) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/BaseComparable.java

        } else if (other instanceof BaseComparable) {
          return s.equals(((BaseComparable) other).s);
        } else {
          return false;
        }
      }
    
      @Override
      public int compareTo(BaseComparable o) {
        return s.compareTo(o.s);
      }
    
      private static final long serialVersionUID = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Apr 20 11:19:03 UTC 2023
    - 1.5K bytes
    - Viewed (0)
Back to top