public SortedArrayStringMap(final int initialCapacity) { if (initialCapacity < 0) { throw new IllegalArgumentException("Initial capacity must be at least zero but was " + initialCapacity); } threshold = ceilingNextPowerOfTwo(initialCapacity == 0 ? 1 : initialCapacity); }
public SortedArrayStringMap(final Map<String, ?> map) { resize(ceilingNextPowerOfTwo(map.size())); for (final Map.Entry<String, ?> entry : map.entrySet()) { putValue(entry.getKey(), entry.getValue()); } }
s.writeInt(ceilingNextPowerOfTwo(threshold)); } else { s.writeInt(keys.length);
final Object[] myVals = values; final int newSize = other.size + this.size; threshold = ceilingNextPowerOfTwo(newSize); if (keys.length < threshold) { keys = new String[threshold];
public SortedArrayStringMap(final ReadOnlyStringMap other) { if (other instanceof SortedArrayStringMap) { initFrom0((SortedArrayStringMap) other); } else if (other != null) { resize(ceilingNextPowerOfTwo(other.size())); other.forEach(PUT_ALL, this); } }
public SortedArrayStringMap(final int initialCapacity) { if (initialCapacity < 1) { throw new IllegalArgumentException("Initial capacity must be at least one but was " + initialCapacity); } threshold = ceilingNextPowerOfTwo(initialCapacity); }
public SortedArrayStringMap(final Map<String, ?> map) { resize(ceilingNextPowerOfTwo(map.size())); for (final Map.Entry<String, ?> entry : map.entrySet()) { putValue(entry.getKey(), entry.getValue()); } }
s.writeInt(ceilingNextPowerOfTwo(threshold)); } else { s.writeInt(keys.length);
final Object[] myVals = values; final int newSize = other.size + this.size; threshold = ceilingNextPowerOfTwo(newSize); if (keys.length < threshold) { keys = new String[threshold];
public SortedArrayStringMap(final ReadOnlyStringMap other) { if (other instanceof SortedArrayStringMap) { initFrom0((SortedArrayStringMap) other); } else if (other != null) { resize(ceilingNextPowerOfTwo(other.size())); other.forEach(PUT_ALL, this); } }