Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 293 for inte (0.13 sec)

  1. android/guava/src/com/google/common/math/IntMath.java

       */
      public static int saturatedAdd(int a, int b) {
        return Ints.saturatedCast((long) a + b);
      }
    
      /**
       * Returns the difference of {@code a} and {@code b} unless it would overflow or underflow in
       * which case {@code Integer.MAX_VALUE} or {@code Integer.MIN_VALUE} is returned, respectively.
       *
       * @since 20.0
       */
      public static int saturatedSubtract(int a, int b) {
        return Ints.saturatedCast((long) a - b);
    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)
  2. android/guava/src/com/google/common/net/InetAddresses.java

       * a qualifying run is found, its hextets are replaced by the sentinel value -1.
       *
       * @param hextets {@code int[]} mutable array of eight 16-bit hextets
       */
      private static void compressLongestRunOfZeroes(int[] hextets) {
        int bestRunStart = -1;
        int bestRunLength = -1;
        int runStart = -1;
        for (int i = 0; i < hextets.length + 1; i++) {
          if (i < hextets.length && hextets[i] == 0) {
            if (runStart < 0) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 44K bytes
    - Viewed (1)
  3. android/guava/src/com/google/common/collect/CompactHashSet.java

          return delegate.add(object);
        }
        int[] entries = requireEntries();
        @Nullable Object[] elements = requireElements();
    
        int newEntryIndex = this.size; // current size, and pointer to the entry to be appended
        int newSize = newEntryIndex + 1;
        int hash = smearedHash(object);
        int mask = hashTableMask();
        int tableIndex = hash & mask;
        int next = CompactHashing.tableGet(requireTable(), tableIndex);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 05 21:38:59 GMT 2024
    - 24K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/OrderingTest.java

        assertEquals(9, (int) numberOrdering.max(iterator));
        assertFalse(iterator.hasNext());
      }
    
      public void testIterableMinAndMax() {
        List<Integer> ints = Lists.newArrayList(5, 3, 0, 9);
        assertEquals(9, (int) numberOrdering.max(ints));
        assertEquals(0, (int) numberOrdering.min(ints));
    
        // when the values are the same, the first argument should be returned
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        assertEquals(9, (int) numberOrdering.max(iterator));
        assertFalse(iterator.hasNext());
      }
    
      public void testIterableMinAndMax() {
        List<Integer> ints = Lists.newArrayList(5, 3, 0, 9);
        assertEquals(9, (int) numberOrdering.max(ints));
        assertEquals(0, (int) numberOrdering.min(ints));
    
        // when the values are the same, the first argument should be returned
    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)
  6. guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

          Integer key = keys.get(random.nextInt(nKeys));
          int delta = random.nextInt(5);
          blah += delta;
          multiset.add(key, delta);
        }
        return blah;
      }
    
      private long runAddRemoveSingleThread(int reps) {
        Random random = new Random();
        int nKeys = keys.size();
        long blah = 0;
        for (int i = 0; i < reps; i++) {
          Integer key = keys.get(random.nextInt(nKeys));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 16.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/Funnels.java

          this.sink = Preconditions.checkNotNull(sink);
        }
    
        @Override
        public void write(int b) {
          sink.putByte((byte) b);
        }
    
        @Override
        public void write(byte[] bytes) {
          sink.putBytes(bytes);
        }
    
        @Override
        public void write(byte[] bytes, int off, int len) {
          sink.putBytes(bytes, off, len);
        }
    
        @Override
        public String toString() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 25 20:32:46 GMT 2022
    - 7.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/ByteStreams.java

       * are read. Otherwise, the first byte read is stored into element {@code b[off]}, the next one
       * into {@code b[off+1]}, and so on. The number of bytes read is, at most, equal to {@code len}.
       *
       * @param in the input stream to read from
       * @param b the buffer into which the data is read
       * @param off an int specifying the offset into the data
       * @param len an int specifying the number of bytes to read
    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/Bytes.java

       * @since 32.0.0
       */
      public static void rotate(byte[] array, int distance, int fromIndex, int toIndex) {
        // See Ints.rotate for more details about possible algorithms here.
        checkNotNull(array);
        checkPositionIndexes(fromIndex, toIndex, array.length);
        if (array.length <= 1) {
          return;
        }
    
        int length = toIndex - fromIndex;
    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)
  10. maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationRequest.java

         */
        BeanConfigurationRequest setBean(Object bean);
    
        /**
         * Gets the configuration to unmarshal into the bean.
         *
         * @return The configuration to unmarshal into the bean or {@code null} if none.
         */
        Object getConfiguration();
    
        /**
         * Sets the configuration to unmarshal into the bean. The configuration should be taken from
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 4.9K bytes
    - Viewed (0)
Back to top