Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 512 for init (0.13 sec)

  1. android/guava-tests/test/com/google/common/collect/OrderingTest.java

      private static void runLeastOfComparison(int iterations, int elements, int seeds) {
        Random random = new Random(42);
        Ordering<Integer> ordering = Ordering.natural();
    
        for (int i = 0; i < iterations; i++) {
          List<Integer> list = Lists.newArrayList();
          for (int j = 0; j < elements; j++) {
            list.add(random.nextInt(10 * i + j + 1));
          }
    
          for (int seed = 1; seed < seeds; seed++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/PreconditionsTest.java

            // fill in the rest of the array with arbitrary instances
            for (int i = 2; i < params.length; i++) {
              params[i] = ArbitraryInstances.get(sig.get(i));
            }
          }
        }
        return params;
      }
    
      private static final ImmutableList<Class<?>> possibleParamTypes =
          ImmutableList.of(char.class, int.class, long.class, Object.class);
    
      /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/TreeMultisetTest.java

    import java.util.Set;
    import java.util.SortedSet;
    import junit.framework.Test;
    import junit.framework.TestCase;
    import junit.framework.TestSuite;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Unit test for {@link TreeMultiset}.
     *
     * @author Neal Kanodia
     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class TreeMultisetTest extends TestCase {
    
      @J2ktIncompatible
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/UnsignedInts.java

       */
      public static Comparator<int[]> lexicographicalComparator() {
        return LexicographicalComparator.INSTANCE;
      }
    
      enum LexicographicalComparator implements Comparator<int[]> {
        INSTANCE;
    
        @Override
        public int compare(int[] left, int[] right) {
          int minLength = Math.min(left.length, right.length);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/IntMath.java

       *
       * @throws ArithmeticException if {@code a + b} overflows in signed {@code int} arithmetic
       */
      public static int checkedAdd(int a, int b) {
        long result = (long) a + b;
        checkNoOverflow(result == (int) result, "checkedAdd", a, b);
        return (int) result;
      }
    
      /**
       * Returns the difference of {@code a} and {@code b}, provided it does not overflow.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/Bytes.java

       *     such index exists.
       */
      public static int indexOf(byte[] array, byte target) {
        return indexOf(array, target, 0, array.length);
      }
    
      // TODO(kevinb): consider making this public
      private static int indexOf(byte[] array, byte target, int start, int end) {
        for (int i = start; i < end; i++) {
          if (array[i] == target) {
            return i;
          }
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

        private int getLeftChildIndex(int i) {
          return i * 2 + 1;
        }
    
        private int getRightChildIndex(int i) {
          return i * 2 + 2;
        }
    
        private int getParentIndex(int i) {
          return (i - 1) / 2;
        }
    
        private int getGrandparentIndex(int i) {
          return getParentIndex(getParentIndex(i)); // (i - 3) / 4
        }
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/ByteStreams.java

          throw new OutOfMemoryError(expectedSize + " bytes is too large to fit in a byte array");
        }
    
        byte[] bytes = new byte[(int) expectedSize];
        int remaining = (int) expectedSize;
    
        while (remaining > 0) {
          int off = (int) expectedSize - remaining;
          int read = in.read(bytes, off, remaining);
          if (read == -1) {
            // end of stream before reading expectedSize bytes
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/Floats.java

       *     such index exists.
       */
      public static int indexOf(float[] array, float target) {
        return indexOf(array, target, 0, array.length);
      }
    
      // TODO(kevinb): consider making this public
      private static int indexOf(float[] array, float target, int start, int end) {
        for (int i = start; i < end; i++) {
          if (array[i] == target) {
            return i;
          }
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/primitives/UnsignedBytes.java

            }
          }
    
          @Override
          public int compare(byte[] left, byte[] right) {
            int stride = 8;
            int minLength = Math.min(left.length, right.length);
            int strideLimit = minLength & ~(stride - 1);
            int i;
    
            /*
             * Compare 8 bytes at a time. Benchmarking on x86 shows a stride of 8 bytes is no slower
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 18.3K bytes
    - Viewed (0)
Back to top