/** * Removes the column value mapping for this key from this map if it is * present.<p> * * Returns the value to which the map previously associated the key, * or {@code null} if the map contained no mapping for this key. * The map will not contain a String mapping for the specified key * once the call returns. * * @param key key whose mapping is to be removed from the map. * @return previous value associated with specified key, or {@code null} * if there was no mapping for key. * * @throws NullPointerException if {@code key} is {@code null}. * * @see Map#remove(Object) */ public String columnRemove(String key) { String resolvedKey = resolveColumnKey(key); columnMapCache.clear(); return (String) columnMap.remove(resolvedKey); }
/** * Removes the column value mapping for this key from this map if it is * present.<p> * * Returns the value to which the map previously associated the key, * or {@code null} if the map contained no mapping for this key. * The map will not contain a String mapping for the specified key * once the call returns. * * @param key key whose mapping is to be removed from the map. * @return previous value associated with specified key, or {@code null} * if there was no mapping for key. * * @throws NullPointerException if {@code key} is {@code null}. * * @see Map#remove(Object) */ public String columnRemove(String key) { String resolvedKey = resolveColumnKey(key); columnMapCache.clear(); return columnMap.remove(resolvedKey); }
/** * Returns {@code true} if this map or a parent map - if any - contains * a mapping for the specified key. * * @param key key whose presence in this LayoutMap chain is to be tested. * @return {@code true} if this map contains a column mapping * for the specified key. * * @throws NullPointerException if the key is {@code null}. * * @see Map#containsKey(Object) */ public boolean columnContainsKey(String key) { String resolvedKey = resolveColumnKey(key); return (columnMap.containsKey(resolvedKey)) || ((parent != null) && (parent.columnContainsKey(resolvedKey))); }
/** * Associates the specified column String with the specified key * in this map. * If the map previously contained a mapping for this key, the old value * is replaced by the specified value. The value set in this map * overrides an association - if any - in the chain of parent LayoutMaps.<p> * * The {@code value} must not be {@code null}. To remove * an association from this map use {@link #columnRemove(String)}. * * @param key key with which the specified value is to be associated. * @param value column expression value to be associated with the specified key. * @return previous String associated with specified key, * or {@code null} if there was no mapping for key. * * @throws NullPointerException if the {@code key} or {@code value} * is {@code null}. * * @see Map#put(Object, Object) */ public String columnPut(String key, String value) { String resolvedKey = resolveColumnKey(key); if (value == null) { throw new NullPointerException("The column expression value must not be null."); } columnMapCache.clear(); return (String) columnMap.put( resolvedKey, value.toLowerCase(Locale.ENGLISH)); }
/** * Returns {@code true} if this map or a parent map - if any - contains * a mapping for the specified key. * * @param key key whose presence in this LayoutMap chain is to be tested. * @return {@code true} if this map contains a column mapping * for the specified key. * * @throws NullPointerException if the key is {@code null}. * * @see Map#containsKey(Object) */ public boolean columnContainsKey(String key) { String resolvedKey = resolveColumnKey(key); return columnMap.containsKey(resolvedKey) || parent != null && parent.columnContainsKey(resolvedKey); }
/** * Associates the specified column String with the specified key * in this map. * If the map previously contained a mapping for this key, the old value * is replaced by the specified value. The value set in this map * overrides an association - if any - in the chain of parent LayoutMaps.<p> * * The {@code value} must not be {@code null}. To remove * an association from this map use {@link #columnRemove(String)}. * * @param key key with which the specified value is to be associated. * @param value column expression value to be associated with the specified key. * @return previous String associated with specified key, * or {@code null} if there was no mapping for key. * * @throws NullPointerException if the {@code key} or {@code value} * is {@code null}. * * @see Map#put(Object, Object) */ public String columnPut(String key, String value) { checkNotNull(value, "The column expression value must not be null."); String resolvedKey = resolveColumnKey(key); columnMapCache.clear(); return columnMap.put( resolvedKey, value.toLowerCase(Locale.ENGLISH)); }
String resolvedKey = resolveColumnKey(key); String cachedValue = (String) columnMapCache.get(resolvedKey); if (cachedValue != null) {
String resolvedKey = resolveColumnKey(key); String cachedValue = columnMapCache.get(resolvedKey); if (cachedValue != null) {