/** Remove a cookie from the set. * @param cookie the cookie to remove */ public void remove(Node.Cookie cookie) { removeImpl((Object)cookie); fireChangeEvent(); }
/** Add a new cookie to the set. If a cookie of the same * <em>actual</em> (not representation!) class is already there, * it is replaced. * <p>Cookies inserted earlier are given preference during lookup, * in case a supplied representation class matches more than one cookie * in the set. * * @param cookie cookie to add */ public void add(Node.Cookie cookie) { addImpl((Object)cookie); fireChangeEvent(); }
/** Registers a Factory for given cookie class */ public void add(Class<? extends Node.Cookie> cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } final CookieEntry ce = new CookieEntry(factory, cookieClass); synchronized (this) { registerCookie(cookieClass, ce); } if (ic != null) { ic.add(ce, C.INSTANCE); } fireChangeEvent(); }
/** Registers a Factory for given cookie classes */ public void add(Class<? extends Node.Cookie>[] cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } CookieEntry[] arr = new CookieEntry[cookieClass.length]; synchronized (this) { for (int i = 0; i < cookieClass.length; i++) { registerCookie(cookieClass[i], arr[i] = new CookieEntry(factory, cookieClass[i])); } } if (ic != null) { int i = 0; for (Class<? extends Node.Cookie> c : cookieClass) { ic.add(arr[i++], C.INSTANCE); } } fireChangeEvent(); }
/** * Unregisters a Factory for given cookie class * @since 2.6 */ public void remove(Class<? extends Node.Cookie> cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } CookieEntry ce = null; synchronized (this) { R r = findR(cookieClass); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { ce = (CookieEntry) c; if (ce.factory == factory) { unregisterCookie(cookieClass, c); } } } } if (ic != null && ce != null) { ic.remove(ce, C.INSTANCE); } fireChangeEvent(); }
fireChangeEvent(); } else if (ic != null) { synchronized (this) {
/** Remove a cookie from the set. * @param cookie the cookie to remove */ public void remove (Node.Cookie cookie) { synchronized (this) { unregisterCookie (cookie.getClass (), cookie); } fireChangeEvent (); }
/** Remove a cookie from the set. * @param cookie the cookie to remove */ public void remove (Node.Cookie cookie) { synchronized (this) { unregisterCookie (cookie.getClass (), cookie); } fireChangeEvent (); }
/** Add a new cookie to the set. If a cookie of the same * <em>actual</em> (not representation!) class is already there, * it is replaced. * <p>Cookies inserted earlier are given preference during lookup, * in case a supplied representation class matches more than one cookie * in the set. * * @param cookie cookie to add */ public void add (Node.Cookie cookie) { synchronized (this) { registerCookie (cookie.getClass (), cookie); } fireChangeEvent (); }
/** Add a new cookie to the set. If a cookie of the same * <em>actual</em> (not representation!) class is already there, * it is replaced. * <p>Cookies inserted earlier are given preference during lookup, * in case a supplied representation class matches more than one cookie * in the set. * * @param cookie cookie to add */ public void add (Node.Cookie cookie) { synchronized (this) { registerCookie (cookie.getClass (), cookie); } fireChangeEvent (); }
/** Registers a Factory for given cookie classes */ public void add(Class[] cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { for (int i = 0; i < cookieClass.length; i++) { registerCookie (cookieClass[i], new CookieEntry(factory, cookieClass[i])); } } fireChangeEvent (); }
/** Registers a Factory for given cookie class */ public void add(Class cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { registerCookie (cookieClass, new CookieEntry(factory, cookieClass)); } fireChangeEvent (); }
/** Registers a Factory for given cookie classes */ public void add(Class[] cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { for (int i = 0; i < cookieClass.length; i++) { registerCookie (cookieClass[i], new CookieEntry(factory, cookieClass[i])); } } fireChangeEvent (); }
/** Registers a Factory for given cookie class */ public void add(Class cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { registerCookie (cookieClass, new CookieEntry(factory, cookieClass)); } fireChangeEvent (); }
/** * Unregisters a Factory for given cookie class * @since 2.6 */ public void remove(Class cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { R r = findR(cookieClass); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass, c); } } } } fireChangeEvent (); }
/** * Unregisters a Factory for given cookie class * @since 2.6 */ public void remove(Class cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { R r = findR(cookieClass); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass, c); } } } } fireChangeEvent (); }
/** * Unregisters a Factory for given cookie classes * @since 2.6 */ public void remove(Class[] cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { for (int i = 0; i < cookieClass.length; i++) { R r = findR(cookieClass[i]); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass[i], c); } } } } } fireChangeEvent (); }
/** * Unregisters a Factory for given cookie classes * @since 2.6 */ public void remove(Class[] cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { for (int i = 0; i < cookieClass.length; i++) { R r = findR(cookieClass[i]); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass[i], c); } } } } } fireChangeEvent (); }