/** * Returns a {@link Set} view of the keys in this map, using the * given common mapped value for any additions (i.e., {@link * Collection#add} and {@link Collection#addAll(Collection)}). * This is of course only appropriate if it is acceptable to use * the same value for all additions from this view. * * @param mappedValue the mapped value to use for any additions * @return the set view * @throws NullPointerException if the mappedValue is null */ public KeySetView<K, V> keySet(final V mappedValue) { if (mappedValue == null) throw new NullPointerException(); return new KeySetView<K, V>(this, mappedValue); }
/** * Returns a {@link Set} view of the keys in this map, using the * given common mapped value for any additions (i.e., {@link * Collection#add} and {@link Collection#addAll(Collection)}). * This is of course only appropriate if it is acceptable to use * the same value for all additions from this view. * * @param mappedValue the mapped value to use for any additions * @return the set view * @throws NullPointerException if the mappedValue is null */ public KeySetView<K, V> keySet(final V mappedValue) { if (mappedValue == null) throw new NullPointerException(); return new KeySetView<K, V>(this, mappedValue); }
/** * Returns a {@link Set} view of the keys in this map, using the * given common mapped value for any additions (i.e., {@link * Collection#add} and {@link Collection#addAll(Collection)}). * This is of course only appropriate if it is acceptable to use * the same value for all additions from this view. * * @param mappedValue the mapped value to use for any additions * @return the set view * @throws NullPointerException if the mappedValue is null */ public KeySetView<K, V> keySet(final V mappedValue) { if (mappedValue == null) throw new NullPointerException(); return new KeySetView<K, V>(this, mappedValue); }
/** * Returns a {@link Set} view of the keys in this map, using the * given common mapped value for any additions (i.e., {@link * Collection#add} and {@link Collection#addAll(Collection)}). * This is of course only appropriate if it is acceptable to use * the same value for all additions from this view. * * @param mappedValue the mapped value to use for any additions * @return the set view * @throws NullPointerException if the mappedValue is null */ public KeySetView<K, V> keySet(final V mappedValue) { if (mappedValue == null) throw new NullPointerException(); return new KeySetView<K, V>(this, mappedValue); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @param initialCapacity The implementation performs internal * sizing to accommodate this many elements. * @return the new set * @throws IllegalArgumentException if the initial capacity of * elements is negative * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet(final int initialCapacity) { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(initialCapacity), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @param initialCapacity The implementation performs internal * sizing to accommodate this many elements. * @return the new set * @throws IllegalArgumentException if the initial capacity of * elements is negative * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet(final int initialCapacity) { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(initialCapacity), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @param initialCapacity The implementation performs internal * sizing to accommodate this many elements. * @return the new set * @throws IllegalArgumentException if the initial capacity of * elements is negative * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet(final int initialCapacity) { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(initialCapacity), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @param initialCapacity The implementation performs internal * sizing to accommodate this many elements. * @return the new set * @throws IllegalArgumentException if the initial capacity of * elements is negative * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet(final int initialCapacity) { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(initialCapacity), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @param initialCapacity The implementation performs internal * sizing to accommodate this many elements. * @return the new set * @throws IllegalArgumentException if the initial capacity of * elements is negative * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet(final int initialCapacity) { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(initialCapacity), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @return the new set * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet() { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @return the new set * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet() { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @return the new set * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet() { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @return the new set * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet() { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @return the new set * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet() { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(), Boolean.TRUE); }
/** * Returns a {@link Set} view of the keys contained in this map. * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. The set supports element * removal, which removes the corresponding mapping from this map, * via the {@code Iterator.remove}, {@code Set.remove}, * {@code removeAll}, {@code retainAll}, and {@code clear} * operations. It does not support the {@code add} or * {@code addAll} operations. * * <p>The view's {@code iterator} is a "weakly consistent" iterator * that will never throw {@link ConcurrentModificationException}, * and guarantees to traverse elements as they existed upon * construction of the iterator, and may (but is not guaranteed to) * reflect any modifications subsequent to construction. * * @return the set view */ public KeySetView<K, V> keySet() { final KeySetView<K, V> ks; return (ks = keySet) != null ? ks : (keySet = new KeySetView<K, V>(this, null)); }
/** * Returns a {@link Set} view of the keys contained in this map. * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. The set supports element * removal, which removes the corresponding mapping from this map, * via the {@code Iterator.remove}, {@code Set.remove}, * {@code removeAll}, {@code retainAll}, and {@code clear} * operations. It does not support the {@code add} or * {@code addAll} operations. * * <p>The view's {@code iterator} is a "weakly consistent" iterator * that will never throw {@link ConcurrentModificationException}, * and guarantees to traverse elements as they existed upon * construction of the iterator, and may (but is not guaranteed to) * reflect any modifications subsequent to construction. * * @return the set view */ public KeySetView<K, V> keySet() { final KeySetView<K, V> ks; return (ks = keySet) != null ? ks : (keySet = new KeySetView<K, V>(this, null)); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @param initialCapacity The implementation performs internal * sizing to accommodate this many elements. * @return the new set * @throws IllegalArgumentException if the initial capacity of * elements is negative * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet(final int initialCapacity) { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(initialCapacity), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @param initialCapacity The implementation performs internal * sizing to accommodate this many elements. * @return the new set * @throws IllegalArgumentException if the initial capacity of * elements is negative * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet(final int initialCapacity) { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(initialCapacity), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @return the new set * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet() { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(), Boolean.TRUE); }
/** * Creates a new {@link Set} backed by a ConcurrentHashMapV8 * from the given type to {@code Boolean.TRUE}. * * @return the new set * @since 1.8 */ public static <K> KeySetView<K, Boolean> newKeySet() { return new KeySetView<K, Boolean> (new ConcurrentHashMapV8<K, Boolean>(), Boolean.TRUE); }