@Test public void validatePositivePowerOfTwFailWith33() { assertThrows(IllegalArgumentException.class, () -> CollectionUtil.validatePositivePowerOfTwo(33)); }
public static void validatePositivePowerOfTwo(final int value) { if (!BitUtil.isPowerOfTwo(value)) { throw new IllegalArgumentException("value must be a positive power of two: " + value); } }
CollectionUtil { public static void validatePositivePowerOfTwo(final int value) { if (!BitUtil.isPowerOfTwo(value)) { throw new IllegalArgumentException("value must be a positive power of two: " + value); } } }
CollectionUtil { public static void validatePositivePowerOfTwo(final int value) { if (!BitUtil.isPowerOfTwo(value)) { throw new IllegalArgumentException("value must be a positive power of two: " + value); } } private  CollectionUtil(); }
CollectionUtil { public static void validatePositivePowerOfTwo(final int value) { if (!BitUtil.isPowerOfTwo(value)) { throw new IllegalArgumentException("value must be a positive power of two: " + value); } } private  CollectionUtil(); static V getOrDefault(final Map<K, V> map, final K key, final Function<K, V> supplier); static int sum(final List<V> values, final ToIntFunction<V> function); static void validateLoadFactor(final float loadFactor); static void validatePositivePowerOfTwo(final int value); static int removeIf(final List<T> values, final Predicate<T> predicate); }
CollectionUtil { public static void validatePositivePowerOfTwo(final int value) { if (!BitUtil.isPowerOfTwo(value)) { throw new IllegalArgumentException("value must be a positive power of two: " + value); } } private  CollectionUtil(); static V getOrDefault(final Map<K, V> map, final K key, final Function<K, V> supplier); static int sum(final List<V> values, final ToIntFunction<V> function); static void validateLoadFactor(final float loadFactor); static void validatePositivePowerOfTwo(final int value); static int removeIf(final List<T> values, final Predicate<T> predicate);  }