Home
last modified time | relevance | path

Searched refs:expectedSize (Results 1 – 25 of 99) sorted by relevance

1234

/external/dagger2/java/dagger/internal/
DDaggerCollections.java65 static <T> HashSet<T> newHashSetWithExpectedSize(int expectedSize) { in newHashSetWithExpectedSize() argument
66 return new HashSet<T>(calculateInitialCapacity(expectedSize)); in newHashSetWithExpectedSize()
73 public static <K, V> LinkedHashMap<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) { in newLinkedHashMapWithExpectedSize() argument
74 return new LinkedHashMap<K, V>(calculateInitialCapacity(expectedSize)); in newLinkedHashMapWithExpectedSize()
77 private static int calculateInitialCapacity(int expectedSize) { in calculateInitialCapacity() argument
78 if (expectedSize < 3) { in calculateInitialCapacity()
79 return expectedSize + 1; in calculateInitialCapacity()
81 if (expectedSize < MAX_POWER_OF_TWO) { in calculateInitialCapacity()
85 return (int) (expectedSize / 0.75F + 1.0F); in calculateInitialCapacity()
/external/guava/guava/src/com/google/common/collect/
DPlatform.java33 static <K, V> Map<K, V> newHashMapWithExpectedSize(int expectedSize) { in newHashMapWithExpectedSize() argument
34 return Maps.newHashMapWithExpectedSize(expectedSize); in newHashMapWithExpectedSize()
41 static <K, V> Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) { in newLinkedHashMapWithExpectedSize() argument
42 return Maps.newLinkedHashMapWithExpectedSize(expectedSize); in newLinkedHashMapWithExpectedSize()
46 static <E> Set<E> newHashSetWithExpectedSize(int expectedSize) { in newHashSetWithExpectedSize() argument
47 return Sets.newHashSetWithExpectedSize(expectedSize); in newHashSetWithExpectedSize()
54 static <E> Set<E> newLinkedHashSetWithExpectedSize(int expectedSize) { in newLinkedHashSetWithExpectedSize() argument
55 return Sets.newLinkedHashSetWithExpectedSize(expectedSize); in newLinkedHashSetWithExpectedSize()
DCompactLinkedHashSet.java94 public static <E> CompactLinkedHashSet<E> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
95 return new CompactLinkedHashSet<E>(expectedSize); in createWithExpectedSize()
123 CompactLinkedHashSet(int expectedSize) { in CompactLinkedHashSet() argument
124 super(expectedSize); in CompactLinkedHashSet()
128 void init(int expectedSize, float loadFactor) { in init() argument
129 super.init(expectedSize, loadFactor); in init()
130 this.predecessor = new int[expectedSize]; in init()
131 this.successor = new int[expectedSize]; in init()
DCompactLinkedHashMap.java70 public static <K, V> CompactLinkedHashMap<K, V> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
71 return new CompactLinkedHashMap<>(expectedSize); in createWithExpectedSize()
99 CompactLinkedHashMap(int expectedSize) { in CompactLinkedHashMap() argument
100 this(expectedSize, DEFAULT_LOAD_FACTOR, false); in CompactLinkedHashMap()
103 CompactLinkedHashMap(int expectedSize, float loadFactor, boolean accessOrder) { in CompactLinkedHashMap() argument
104 super(expectedSize, loadFactor); in CompactLinkedHashMap()
109 void init(int expectedSize, float loadFactor) { in init() argument
110 super.init(expectedSize, loadFactor); in init()
113 links = new long[expectedSize]; in init()
DHashBasedTable.java54 final int expectedSize; field in HashBasedTable.Factory
56 Factory(int expectedSize) { in Factory() argument
57 this.expectedSize = expectedSize; in Factory()
62 return Maps.newLinkedHashMapWithExpectedSize(expectedSize); in get()
DCompactHashSet.java114 public static <E> CompactHashSet<E> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
115 return new CompactHashSet<E>(expectedSize); in createWithExpectedSize()
181 CompactHashSet(int expectedSize) { in CompactHashSet() argument
182 init(expectedSize, DEFAULT_LOAD_FACTOR); in CompactHashSet()
186 void init(int expectedSize, float loadFactor) { in init() argument
187 Preconditions.checkArgument(expectedSize >= 0, "Initial capacity must be non-negative"); in init()
189 int buckets = Hashing.closedTableSize(expectedSize, loadFactor); in init()
192 this.elements = new Object[expectedSize]; in init()
193 this.entries = newEntries(expectedSize); in init()
DMinMaxPriorityQueue.java133 public static Builder<Comparable> expectedSize(int expectedSize) { in expectedSize() method in MinMaxPriorityQueue
134 return new Builder<Comparable>(Ordering.natural()).expectedSize(expectedSize); in expectedSize()
166 private int expectedSize = UNSET_EXPECTED_SIZE; field in MinMaxPriorityQueue.Builder
178 public Builder<B> expectedSize(int expectedSize) { in expectedSize() argument
179 checkArgument(expectedSize >= 0); in expectedSize()
180 this.expectedSize = expectedSize; in expectedSize()
212 this, initialQueueSize(expectedSize, maximumSize, initialContents)); in create()
/external/guava/android/guava/src/com/google/common/collect/
DPlatform.java33 static <K, V> Map<K, V> newHashMapWithExpectedSize(int expectedSize) { in newHashMapWithExpectedSize() argument
34 return CompactHashMap.createWithExpectedSize(expectedSize); in newHashMapWithExpectedSize()
41 static <K, V> Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) { in newLinkedHashMapWithExpectedSize() argument
42 return CompactLinkedHashMap.createWithExpectedSize(expectedSize); in newLinkedHashMapWithExpectedSize()
46 static <E> Set<E> newHashSetWithExpectedSize(int expectedSize) { in newHashSetWithExpectedSize() argument
47 return CompactHashSet.createWithExpectedSize(expectedSize); in newHashSetWithExpectedSize()
54 static <E> Set<E> newLinkedHashSetWithExpectedSize(int expectedSize) { in newLinkedHashSetWithExpectedSize() argument
55 return CompactLinkedHashSet.createWithExpectedSize(expectedSize); in newLinkedHashSetWithExpectedSize()
DObjectCountLinkedHashMap.java45 public static <K> ObjectCountLinkedHashMap<K> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
46 return new ObjectCountLinkedHashMap<K>(expectedSize); in createWithExpectedSize()
72 ObjectCountLinkedHashMap(int expectedSize) { in ObjectCountLinkedHashMap() argument
73 this(expectedSize, DEFAULT_LOAD_FACTOR); in ObjectCountLinkedHashMap()
76 ObjectCountLinkedHashMap(int expectedSize, float loadFactor) { in ObjectCountLinkedHashMap() argument
77 super(expectedSize, loadFactor); in ObjectCountLinkedHashMap()
88 void init(int expectedSize, float loadFactor) { in init() argument
89 super.init(expectedSize, loadFactor); in init()
92 links = new long[expectedSize]; in init()
DCompactLinkedHashMap.java61 public static <K, V> CompactLinkedHashMap<K, V> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
62 return new CompactLinkedHashMap<>(expectedSize); in createWithExpectedSize()
90 CompactLinkedHashMap(int expectedSize) { in CompactLinkedHashMap() argument
91 this(expectedSize, DEFAULT_LOAD_FACTOR, false); in CompactLinkedHashMap()
94 CompactLinkedHashMap(int expectedSize, float loadFactor, boolean accessOrder) { in CompactLinkedHashMap() argument
95 super(expectedSize, loadFactor); in CompactLinkedHashMap()
100 void init(int expectedSize, float loadFactor) { in init() argument
101 super.init(expectedSize, loadFactor); in init()
104 links = new long[expectedSize]; in init()
DCompactLinkedHashSet.java89 public static <E> CompactLinkedHashSet<E> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
90 return new CompactLinkedHashSet<E>(expectedSize); in createWithExpectedSize()
118 CompactLinkedHashSet(int expectedSize) { in CompactLinkedHashSet() argument
119 super(expectedSize); in CompactLinkedHashSet()
123 void init(int expectedSize, float loadFactor) { in init() argument
124 super.init(expectedSize, loadFactor); in init()
125 this.predecessor = new int[expectedSize]; in init()
126 this.successor = new int[expectedSize]; in init()
DHashBasedTable.java54 final int expectedSize; field in HashBasedTable.Factory
56 Factory(int expectedSize) { in Factory() argument
57 this.expectedSize = expectedSize; in Factory()
62 return Maps.newLinkedHashMapWithExpectedSize(expectedSize); in get()
DObjectCountHashMap.java58 public static <K> ObjectCountHashMap<K> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
59 return new ObjectCountHashMap<K>(expectedSize); in createWithExpectedSize()
132 ObjectCountHashMap(int expectedSize, float loadFactor) { in ObjectCountHashMap() argument
133 init(expectedSize, loadFactor); in ObjectCountHashMap()
136 void init(int expectedSize, float loadFactor) { in init() argument
137 Preconditions.checkArgument(expectedSize >= 0, "Initial capacity must be non-negative"); in init()
139 int buckets = Hashing.closedTableSize(expectedSize, loadFactor); in init()
143 this.keys = new Object[expectedSize]; in init()
144 this.values = new int[expectedSize]; in init()
146 this.entries = newEntries(expectedSize); in init()
DCompactHashSet.java110 public static <E> CompactHashSet<E> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
111 return new CompactHashSet<E>(expectedSize); in createWithExpectedSize()
177 CompactHashSet(int expectedSize) { in CompactHashSet() argument
178 init(expectedSize, DEFAULT_LOAD_FACTOR); in CompactHashSet()
182 void init(int expectedSize, float loadFactor) { in init() argument
183 Preconditions.checkArgument(expectedSize >= 0, "Initial capacity must be non-negative"); in init()
185 int buckets = Hashing.closedTableSize(expectedSize, loadFactor); in init()
188 this.elements = new Object[expectedSize]; in init()
189 this.entries = newEntries(expectedSize); in init()
DMinMaxPriorityQueue.java133 public static Builder<Comparable> expectedSize(int expectedSize) { in expectedSize() argument
134 return new Builder<Comparable>(Ordering.natural()).expectedSize(expectedSize); in expectedSize()
166 private int expectedSize = UNSET_EXPECTED_SIZE; field in MinMaxPriorityQueue.Builder
178 public Builder<B> expectedSize(int expectedSize) { in expectedSize() argument
179 checkArgument(expectedSize >= 0); in expectedSize()
180 this.expectedSize = expectedSize; in expectedSize()
212 this, initialQueueSize(expectedSize, maximumSize, initialContents)); in create()
DCompactHashMap.java94 public static <K, V> CompactHashMap<K, V> createWithExpectedSize(int expectedSize) { in createWithExpectedSize() argument
95 return new CompactHashMap<>(expectedSize); in createWithExpectedSize()
175 CompactHashMap(int expectedSize, float loadFactor) { in CompactHashMap() argument
176 init(expectedSize, loadFactor); in CompactHashMap()
180 void init(int expectedSize, float loadFactor) { in init() argument
181 Preconditions.checkArgument(expectedSize >= 0, "Initial capacity must be non-negative"); in init()
183 int buckets = Hashing.closedTableSize(expectedSize, loadFactor); in init()
187 this.keys = new Object[expectedSize]; in init()
188 this.values = new Object[expectedSize]; in init()
190 this.entries = newEntries(expectedSize); in init()
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DPlatform.java34 static <K, V> Map<K, V> newHashMapWithExpectedSize(int expectedSize) { in newHashMapWithExpectedSize() argument
35 return Maps.newHashMapWithExpectedSize(expectedSize); in newHashMapWithExpectedSize()
38 static <K, V> Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) { in newLinkedHashMapWithExpectedSize() argument
39 return Maps.newLinkedHashMapWithExpectedSize(expectedSize); in newLinkedHashMapWithExpectedSize()
42 static <E> Set<E> newHashSetWithExpectedSize(int expectedSize) { in newHashSetWithExpectedSize() argument
43 return Sets.newHashSetWithExpectedSize(expectedSize); in newHashSetWithExpectedSize()
46 static <E> Set<E> newLinkedHashSetWithExpectedSize(int expectedSize) { in newLinkedHashSetWithExpectedSize() argument
47 return Sets.newLinkedHashSetWithExpectedSize(expectedSize); in newLinkedHashSetWithExpectedSize()
/external/webrtc/talk/app/webrtc/androidtests/src/org/webrtc/
DSurfaceViewRendererOnMeasureTest.java184 final Point expectedSize = in testFrame1280x720() local
187 expectedSize.x, expectedSize.y, widthSpec, heightSpec); in testFrame1280x720()
196 final Point expectedSize = in testFrame1280x720() local
199 expectedSize.x, expectedSize.y, widthSpec, heightSpec); in testFrame1280x720()
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/
DOpenIntToDoubleHashMap.java110 public OpenIntToDoubleHashMap(final int expectedSize) { in OpenIntToDoubleHashMap() argument
111 this(expectedSize, Double.NaN); in OpenIntToDoubleHashMap()
119 public OpenIntToDoubleHashMap(final int expectedSize, in OpenIntToDoubleHashMap() argument
121 final int capacity = computeCapacity(expectedSize); in OpenIntToDoubleHashMap()
152 private static int computeCapacity(final int expectedSize) { in computeCapacity() argument
153 if (expectedSize == 0) { in computeCapacity()
156 final int capacity = (int) FastMath.ceil(expectedSize / LOAD_FACTOR); in computeCapacity()
DOpenIntToFieldHashMap.java119 public OpenIntToFieldHashMap(final Field<T> field,final int expectedSize) { in OpenIntToFieldHashMap() argument
120 this(field,expectedSize, field.getZero()); in OpenIntToFieldHashMap()
129 public OpenIntToFieldHashMap(final Field<T> field,final int expectedSize, in OpenIntToFieldHashMap() argument
132 final int capacity = computeCapacity(expectedSize); in OpenIntToFieldHashMap()
164 private static int computeCapacity(final int expectedSize) { in computeCapacity() argument
165 if (expectedSize == 0) { in computeCapacity()
168 final int capacity = (int) FastMath.ceil(expectedSize / LOAD_FACTOR); in computeCapacity()
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
DMultimapSizeTester.java43 int expectedSize = getNumElements(); in testSize() local
45 assertEquals(expectedSize, multimap.size()); in testSize()
52 assertEquals(expectedSize, size); in testSize()
58 assertEquals(expectedSize, size2); in testSize()
DMultisetElementSetTester.java67 int expectedSize = size - getMultiset().count(e0()); in testElementSetRemovePropagatesToMultiset() local
70 assertEquals(expectedSize, getMultiset().size()); in testElementSetRemovePropagatesToMultiset()
78 int expectedSize = size - getMultiset().count(e0()); in testElementSetRemoveDuplicatePropagatesToMultiset() local
82 assertEquals(expectedSize, getMultiset().size()); in testElementSetRemoveDuplicatePropagatesToMultiset()
/external/guava/android/guava-testlib/src/com/google/common/collect/testing/google/
DMultisetElementSetTester.java67 int expectedSize = size - getMultiset().count(e0()); in testElementSetRemovePropagatesToMultiset() local
70 assertEquals(expectedSize, getMultiset().size()); in testElementSetRemovePropagatesToMultiset()
78 int expectedSize = size - getMultiset().count(e0()); in testElementSetRemoveDuplicatePropagatesToMultiset() local
82 assertEquals(expectedSize, getMultiset().size()); in testElementSetRemoveDuplicatePropagatesToMultiset()
DMultimapSizeTester.java43 int expectedSize = getNumElements(); in testSize() local
45 assertEquals(expectedSize, multimap.size()); in testSize()
52 assertEquals(expectedSize, size); in testSize()
58 assertEquals(expectedSize, size2); in testSize()
/external/kotlinx.coroutines/kotlinx-coroutines-core/js/src/internal/
DConcurrent.kt18 internal actual fun <E> identitySet(expectedSize: Int): MutableSet<E> = HashSet(expectedSize)

1234