- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 280 for ints (0.02 sec)
-
android/guava/src/com/google/common/primitives/Ints.java
public static int constrainToRange(int value, int min, int max) { checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max); return Math.min(Math.max(value, min), max); } /** * Returns the values from each provided array combined into a single array. For example, {@code * concat(new int[] {a, b}, new int[] {}, new int[] {c}} returns the array {@code {a, b, c}}. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 31K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/IntsTest.java
assertThat(Ints.constrainToRange((int) 1, (int) 0, (int) 5)).isEqualTo((int) 1); assertThat(Ints.constrainToRange((int) 1, (int) 1, (int) 5)).isEqualTo((int) 1); assertThat(Ints.constrainToRange((int) 1, (int) 3, (int) 5)).isEqualTo((int) 3); assertThat(Ints.constrainToRange((int) 0, (int) -5, (int) -1)).isEqualTo((int) -1); assertThat(Ints.constrainToRange((int) 5, (int) 2, (int) 2)).isEqualTo((int) 2); assertThrows(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 29.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Hashing.java
* hereby disclaims copyright to this source code. */ static int smear(int hashCode) { return (int) (C2 * Integer.rotateLeft((int) (hashCode * C1), 15)); } static int smearedHash(@CheckForNull Object o) { return smear((o == null) ? 0 : o.hashCode()); } private static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO; static int closedTableSize(int expectedEntries, double loadFactor) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/Hashing.java
* hereby disclaims copyright to this source code. */ static int smear(int hashCode) { return (int) (C2 * Integer.rotateLeft((int) (hashCode * C1), 15)); } static int smearedHash(@CheckForNull Object o) { return smear((o == null) ? 0 : o.hashCode()); } private static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO; static int closedTableSize(int expectedEntries, double loadFactor) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CompactHashing.java
* current hashtable size. */ static int newCapacity(int mask) { return ((mask < 32) ? 4 : 2) * (mask + 1); } /** Returns the hash prefix given the current mask. */ static int getHashPrefix(int value, int mask) { return value & ~mask; } /** Returns the index, or 0 if the entry is "null". */ static int getNext(int entry, int mask) { return entry & mask; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 15:34:52 UTC 2024 - 7.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableMultiset.java
private final transient int size; @LazyInit @CheckForNull private transient ImmutableSet<E> elementSet; RegularImmutableMultiset(ObjectCountHashMap<E> contents) { this.contents = contents; long size = 0; for (int i = 0; i < contents.size(); i++) { size += contents.getValue(i); } this.size = Ints.saturatedCast(size); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Nov 30 21:54:06 UTC 2023 - 4.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableSortedMultiset.java
this.elementSet = elementSet; this.cumulativeCounts = cumulativeCounts; this.offset = offset; this.length = length; } private int getCount(int index) { return (int) (cumulativeCounts[offset + index + 1] - cumulativeCounts[offset + index]); } @Override Entry<E> getEntry(int index) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 4.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/TestIntegerSetGenerator.java
import com.google.common.collect.testing.SampleElements.Ints; import java.util.List; import java.util.Set; /** * Create integer sets for collection tests. * * @author Gregory Kick */ @GwtCompatible @ElementTypesAreNonnullByDefault public abstract class TestIntegerSetGenerator implements TestSetGenerator<Integer> { @Override public SampleElements<Integer> samples() { return new Ints(); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 21 16:49:06 UTC 2024 - 2.1K bytes - Viewed (0) -
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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 42.6K bytes - Viewed (0) -
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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 42.6K bytes - Viewed (0)