Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 71 - 80 of 201 for comparing (0.06 seconds)

  1. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

      public void testNewDataOutput_writeChars() {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeChars("r\u00C9sum\u00C9");
        // need to remove byte order mark before comparing
        byte[] expected = Arrays.copyOfRange(utf16ExpectedWithBom, 2, 14);
        assertThat(out.toByteArray()).isEqualTo(expected);
      }
    
      @AndroidIncompatible // https://issuetracker.google.com/issues/37074504
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 22K bytes
    - Click Count (0)
  2. src/main/java/jcifs/smb/SmbResourceLocatorImpl.java

            if (!(obj instanceof final SmbResourceLocatorImpl o)) {
                return false;
            }
    
            /*
             * If uncertain, pathNamesPossiblyEqual returns true.
             * Comparing canonical paths is definitive.
             */
            if (pathNamesPossiblyEqual(this.url.getPath(), o.url.getPath()) && getURLPath().equalsIgnoreCase(o.getURLPath())) {
                try {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 23.6K bytes
    - Click Count (0)
  3. src/bytes/example_test.go

    	fmt.Printf("%s\n", clone)
    	clone[0] = 'd'
    	fmt.Printf("%s\n", b)
    	fmt.Printf("%s\n", clone)
    	// Output:
    	// abc
    	// abc
    	// dbc
    }
    
    func ExampleCompare() {
    	// Interpret Compare's result by comparing it to zero.
    	var a, b []byte
    	if bytes.Compare(a, b) < 0 {
    		// a less b
    	}
    	if bytes.Compare(a, b) <= 0 {
    		// a less or equal b
    	}
    	if bytes.Compare(a, b) > 0 {
    		// a greater b
    	}
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Mon May 12 16:07:54 GMT 2025
    - 16.5K bytes
    - Click Count (0)
  4. src/bytes/bytes.go

    // A nil argument is equivalent to an empty slice.
    func Equal(a, b []byte) bool {
    	// Neither cmd/compile nor gccgo allocates for these string conversions.
    	return string(a) == string(b)
    }
    
    // Compare returns an integer comparing two byte slices lexicographically.
    // The result will be 0 if a == b, -1 if a < b, and +1 if a > b.
    // A nil argument is equivalent to an empty slice.
    func Compare(a, b []byte) int {
    	return bytealg.Compare(a, b)
    }
    
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Thu Mar 12 17:56:55 GMT 2026
    - 36.3K bytes
    - Click Count (0)
  5. guava/src/com/google/common/cache/CacheBuilder.java

      @CanIgnoreReturnValue
      CacheBuilder<K, V> lenientParsing() {
        strictParsing = false;
        return this;
      }
    
      /**
       * Sets a custom {@code Equivalence} strategy for comparing keys.
       *
       * <p>By default, the cache uses {@link Equivalence#identity} to determine key equality when
       * {@link #weakKeys} is specified, and {@link Equivalence#equals()} otherwise.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 13:13:59 GMT 2026
    - 51.7K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/primitives/Booleans.java

        }
      }
    
      /**
       * Returns a {@code Comparator<Boolean>} that sorts {@code true} before {@code false}.
       *
       * <p>This is particularly useful in Java 8+ in combination with {@code Comparator.comparing},
       * e.g. {@code Comparator.comparing(Foo::hasBar, trueFirst())}.
       *
       * @since 21.0
       */
      public static Comparator<Boolean> trueFirst() {
        return BooleanComparator.TRUE_FIRST;
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Sep 25 15:01:23 GMT 2025
    - 20.6K bytes
    - Click Count (0)
  7. android/guava/src/com/google/common/io/Files.java

          return true;
        }
    
        /*
         * Some operating systems may return zero as the length for files denoting system-dependent
         * entities such as devices or pipes, in which case we must fall back on comparing the bytes
         * directly.
         */
        long len1 = file1.length();
        long len2 = file2.length();
        if (len1 != 0 && len2 != 0 && len1 != len2) {
          return false;
        }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Jan 05 22:13:21 GMT 2026
    - 32.8K bytes
    - Click Count (0)
  8. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rerun/executer/RerunTestExecuter.java

                + runCount
                + ")\n"
                + activeDescriptors.stream()
                    .filter(d -> d.getId() instanceof CompositeIdGenerator.CompositeId)
                    .sorted(Comparator.comparing(o -> o.getId().toString()))
                    .map(TestDescriptorInternal::getName)
                    .collect(Collectors.joining(" > "))
                + "\n"
                + "================\n";
            System.out.println(report);
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 3.1K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/io/MoreFiles.java

          return true;
        }
    
        /*
         * Some operating systems may return zero as the length for files denoting system-dependent
         * entities such as devices or pipes, in which case we must fall back on comparing the bytes
         * directly.
         */
        ByteSource source1 = asByteSource(path1);
        ByteSource source2 = asByteSource(path2);
        long len1 = source1.sizeIfKnown().or(0L);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Apr 14 16:07:06 GMT 2025
    - 34.6K bytes
    - Click Count (0)
  10. compat/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java

    import org.eclipse.aether.transfer.TransferListener;
    import org.slf4j.ILoggerFactory;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    
    import static java.util.Comparator.comparing;
    import static org.apache.maven.api.Constants.MAVEN_HOME;
    import static org.apache.maven.api.Constants.MAVEN_INSTALLATION_CONF;
    
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Mon Oct 27 13:24:03 GMT 2025
    - 78.1K bytes
    - Click Count (0)
Back to Top