Package com.nomagic.magicdraw.cookies
Class CookieSet
java.lang.Object
com.nomagic.magicdraw.cookies.CookieSet
Support class for storing cookies and retrieving them by representation class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new cookie to the set.void
Registers a Factory for given cookie classesvoid
Registers a Factory for given cookie classvoid
Add a listener to changes in the cookie set.Get a cookie.void
Remove a cookie from the set.void
Unregisters a Factory for given cookie classesvoid
Unregisters a Factory for given cookie classvoid
Remove a listener to changes in the cookie set.
-
Constructor Details
-
CookieSet
public CookieSet()
-
-
Method Details
-
add
Add a new cookie to the set. If a cookie of the same actual (not representation!) class is already there, it is replaced.Cookies inserted earlier are given preference during lookup, in case a supplied representation class matches more than one cookie in the set.
- Parameters:
cookie
- cookie to add
-
remove
Remove a cookie from the set.- Parameters:
cookie
- the cookie to remove
-
getCookie
Get a cookie.- Parameters:
clazz
- the representation class- Returns:
- a cookie assignable to the representation class, or
null
if there is none
-
addChangeListener
Add a listener to changes in the cookie set.- Parameters:
l
- the listener to add
-
removeChangeListener
Remove a listener to changes in the cookie set.- Parameters:
l
- the listener to remove
-
add
Registers a Factory for given cookie class -
add
Registers a Factory for given cookie classes -
remove
Unregisters a Factory for given cookie class- Since:
- 2.6
-
remove
Unregisters a Factory for given cookie classes- Since:
- 2.6
-