Returns the segment that should be used for a key with the given hash. @param hash the hash code for the key @return the segment
(int hash)
| 1942 | */ |
| 1943 | |
| 1944 | Segment<K, V> segmentFor(int hash) { |
| 1945 | // TODO(fry): Lazily create segments? |
| 1946 | return segments[(hash >>> segmentShift) & segmentMask]; |
| 1947 | } |
| 1948 | |
| 1949 | Segment<K, V> createSegment(int initialCapacity, long maxSegmentWeight, StatsCounter statsCounter) { |
| 1950 | return new Segment<K, V>(this, initialCapacity, maxSegmentWeight, statsCounter); |
no outgoing calls
no test coverage detected