Code example for Set

Methods: contains

0
	 * @return {@code true} if the value is to be considered as immutable for the 
	 * purposes of session attribute management; {@code false} otherwise 
	 * @see #updateAccessedSessionAttributes() 
	 */ 
	protected boolean isImmutableSessionAttribute(String name, Object value) {
		return (value == null || immutableValueTypes.contains(value.getClass()));
	} 
 
	/** 
	 * Register the given callback as to be executed after session termination. 
	 * <p>Note: The callback object should be serializable in order to survive 
	 * web app restarts. 
	 * @param name the name of the attribute to register the callback for 
	 * @param callback the callback to be executed for destruction 
	 */ 
	protected void registerSessionDestructionCallback(String name, Runnable callback) {
		HttpSession session = getSession(true);
		session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name,
				new DestructionCallbackBindingListener(callback));
	} 
Contextual code suggestions in your IDE  Get Codota for Java