@Override public V put(final Long key, final V value) { return put(key.longValue(), value); }
@Override public V put(final Long key, final V value) { return put(key.longValue(), value); }
@Override public void putAll(final Map<? extends Long, ? extends V> map) { for (final Entry<? extends Long, ? extends V> entry : map.entrySet()) { put(entry.getKey(), entry.getValue()); } }
@Override public void putAll(final Map<? extends Long, ? extends V> map) { for (final Entry<? extends Long, ? extends V> entry : map.entrySet()) { put(entry.getKey(), entry.getValue()); } }
/** * Put a value into the map. * * @param keyPartA for the key * @param keyPartB for the key * @param value to put into the map * @return the previous value if found otherwise null */ public V put(final int keyPartA, final int keyPartB, final V value) { final long key = compoundKey(keyPartA, keyPartB); return map.put(key, value); }
/** * Put a value into the map. * * @param keyPartA for the key * @param keyPartB for the key * @param value to put into the map * @return the previous value if found otherwise null */ public V put(final int keyPartA, final int keyPartB, final V value) { final long key = compoundKey(keyPartA, keyPartB); return map.put(key, value); }
/** * Get a value for a given key, or if it does ot exist then default the value via a {@link LongFunction} * and put it in the map. * * @param key to search on. * @param mappingFunction to provide a value if the get returns null. * @return the value if found otherwise the default. */ public V computeIfAbsent(final long key, final LongFunction<? extends V> mappingFunction) { checkNotNull(mappingFunction, "mappingFunction cannot be null"); V value = get(key); if (value == null) { value = mappingFunction.apply(key); if (value != null) { put(key, value); } } return value; }
/** * Get a value for a given key, or if it does ot exist then default the value via a {@link LongFunction} * and put it in the map. * * @param key to search on. * @param mappingFunction to provide a value if the get returns null. * @return the value if found otherwise the default. */ public V computeIfAbsent(final long key, final LongFunction<? extends V> mappingFunction) { checkNotNull(mappingFunction, "mappingFunction cannot be null"); V value = get(key); if (value == null) { value = mappingFunction.apply(key); if (value != null) { put(key, value); } } return value; }
builderBySessionIdMap.put(message.getCorrelationId(), builder); builder.append(message.buffer(), 0, message.getFrameLength()); } else {
builderBySessionIdMap.put(message.getCorrelationId(), builder); builder.append(message.buffer(), 0, message.getFrameLength()); } else {