Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 769 for compare (0.21 sec)

  1. src/bytes/compare_test.go

    			copy(shiftedB, tt.b)
    			cmp := Compare(tt.a, shiftedB)
    			if cmp != tt.i {
    				t.Errorf(`Compare(%q, %q), offset %d = %v; want %v`, tt.a, tt.b, offset, cmp, tt.i)
    			}
    		}
    	}
    }
    
    func TestCompareIdenticalSlice(t *testing.T) {
    	var b = []byte("Hello Gophers!")
    	if Compare(b, b) != 0 {
    		t.Error("b != b")
    	}
    	if Compare(b, b[:1]) != 1 {
    		t.Error("b > b[:1] failed")
    	}
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ComparisonChain.java

     * compare} methods unconditionally, the {@code ComparisonChain} implementation stops calling its
     * inputs' {@link Comparable#compareTo compareTo} and {@link Comparator#compare compare} methods as
     * soon as one of them returns a nonzero result. This optimization is typically important only in
     * the presence of expensive {@code compareTo} and {@code compare} implementations.
     *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Sep 21 17:28:11 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ComparisonChain.java

     * compare} methods unconditionally, the {@code ComparisonChain} implementation stops calling its
     * inputs' {@link Comparable#compareTo compareTo} and {@link Comparator#compare compare} methods as
     * soon as one of them returns a nonzero result. This optimization is typically important only in
     * the presence of expensive {@code compareTo} and {@code compare} implementations.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 24 17:47:51 GMT 2022
    - 9.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ComparisonChainTest.java

                    .compare("b", "a")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
                    .result())
            .isGreaterThan(0);
      }
    
      public void testShortCircuitSecondStep() {
        assertThat(
                ComparisonChain.start()
                    .compare("a", "a")
                    .compare("a", "b")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
                    .result())
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ComparisonChainTest.java

                    .compare("b", "a")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
                    .result())
            .isGreaterThan(0);
      }
    
      public void testShortCircuitSecondStep() {
        assertThat(
                ComparisonChain.start()
                    .compare("a", "a")
                    .compare("a", "b")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 27 13:27:08 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/SignedBytes.java

        }
        return (byte) value;
      }
    
      /**
       * Compares the two specified {@code byte} values. The sign of the value returned is the same as
       * that of {@code ((Byte) a).compareTo(b)}.
       *
       * <p><b>Note:</b> this method behaves identically to the JDK 7 method {@link Byte#compare}.
       *
       * @param a the first {@code byte} to compare
       * @param b the second {@code byte} to compare
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:09:25 GMT 2021
    - 7.5K bytes
    - Viewed (0)
  7. operator/cmd/mesh/manifest-diff.go

    	"istio.io/istio/operator/pkg/compare"
    	"istio.io/istio/operator/pkg/util"
    )
    
    // YAMLSuffix is the suffix of a YAML file.
    const YAMLSuffix = ".yaml"
    
    type manifestDiffArgs struct {
    	// compareDir indicates comparison between directory.
    	compareDir bool
    	// verbose generates verbose output.
    	verbose bool
    	// selectResources constrains the list of resources to compare to only the ones in this list, ignoring all others.
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Comparators.java

       * Comparators}</a>.
       *
       * @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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 11 08:42:51 GMT 2024
    - 10K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/Helpers.java

            assertTrue(
                comparator + ".compare(" + lesser + ", " + t + ")", comparator.compare(lesser, t) < 0);
          }
    
          assertEquals(comparator + ".compare(" + t + ", " + t + ")", 0, comparator.compare(t, t));
    
          for (int j = i + 1; j < valuesInExpectedOrder.size(); j++) {
            T greater = valuesInExpectedOrder.get(j);
            assertTrue(
                comparator + ".compare(" + greater + ", " + t + ")",
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Ordering.java

       * instead (but note that it does not guarantee which tied minimum element is returned).
       *
       * @param a value to compare, returned if less than or equal to the rest.
       * @param b value to compare
       * @param c value to compare
       * @param rest values to compare
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i> under this
       *     ordering.
       */
      @ParametricNullness
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
Back to top