/** Remove some children from the list by key. * @param keys collection of keys to remove */ protected final void removeAll(final Collection<? extends T> keys) { try { PR.enterWriteAccess(); getMap().keySet().removeAll(keys); refreshImpl(); } finally { PR.exitWriteAccess(); } }
/** Remove a given child node from the list by its key. * @param key key to remove */ protected void remove(final T key) { try { PR.enterWriteAccess(); if (nodes != null && nodes.remove(key) != null) { refreshImpl(); } } finally { PR.exitWriteAccess(); } }
/** Add a collection of new key/value pairs into the map. * The supplied map may contain any keys, but the values must be {@link Node}s. * * @param map the map with pairs to add */ protected final void putAll(final java.util.Map<? extends T,? extends Node> map) { try { PR.enterWriteAccess(); getMap().putAll(map); refreshImpl(); // PENDING sometime we should also call refreshKey... } finally { PR.exitWriteAccess(); } }
/** Add one key and one node to the list. * @param key the key * @param node the node */ protected final void put (final Object key, final Node node) { try { PR.enterWriteAccess (); if (nodes.put (key, node) != null) { refreshKeyImpl (key); } else { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
/** Add a collection of new key/value pairs into the map. * The supplied map may contain any keys, but the values must be {@link Node}s. * * @param map the map with pairs to add */ protected final void putAll (final java.util.Map map) { try { PR.enterWriteAccess (); nodes.putAll (map); refreshImpl (); // PENDING sometime we should also call refreshKey... } finally { PR.exitWriteAccess (); } }
/** Add a collection of new key/value pairs into the map. * The supplied map may contain any keys, but the values must be {@link Node}s. * * @param map the map with pairs to add */ protected final void putAll (final java.util.Map map) { try { PR.enterWriteAccess (); nodes.putAll (map); refreshImpl (); // PENDING sometime we should also call refreshKey... } finally { PR.exitWriteAccess (); } }
/** Add one key and one node to the list. * @param key the key * @param node the node */ protected final void put (final Object key, final Node node) { try { PR.enterWriteAccess (); if (nodes.put (key, node) != null) { refreshKeyImpl (key); } else { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
/** Remove a given child node from the list by its key. * @param key key to remove */ protected void remove (final Object key) { try { PR.enterWriteAccess (); if (nodes.remove (key) != null) { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
/** Remove a given child node from the list by its key. * @param key key to remove */ protected void remove (final Object key) { try { PR.enterWriteAccess (); if (nodes.remove (key) != null) { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
/** Remove some children from the list by key. * @param keys collection of keys to remove */ protected final void removeAll (final Collection keys) { try { PR.enterWriteAccess (); nodes.keySet ().removeAll (keys); refreshImpl (); } finally { PR.exitWriteAccess (); } }
/** Remove some children from the list by key. * @param keys collection of keys to remove */ protected final void removeAll (final Collection keys) { try { PR.enterWriteAccess (); nodes.keySet ().removeAll (keys); refreshImpl (); } finally { PR.exitWriteAccess (); } }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. */ protected final void refresh () { try { PR.enterWriteAccess (); refreshImpl (); } finally { PR.exitWriteAccess (); } }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. */ protected final void refresh () { try { PR.enterWriteAccess (); refreshImpl (); } finally { PR.exitWriteAccess (); } }
/** Add one key and one node to the list. * @param key the key * @param node the node */ protected final void put(final T key, final Node node) { try { PR.enterWriteAccess(); if (getMap().put(key, node) != null) { refreshKeyImpl(key); } else { refreshImpl(); } } finally { PR.exitWriteAccess(); } }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. */ protected final void refresh() { try { PR.enterWriteAccess(); refreshImpl(); } finally { PR.exitWriteAccess(); } }