Code example for Set

Methods: contains

	 * @param attributeName the attribute name to check, never {@code null} 
	 * @param attributeType the type for the attribute, possibly {@code null} 
	public boolean isHandlerSessionAttribute(String attributeName, Class<?> attributeType) {
		Assert.notNull(attributeName, "Attribute name must not be null");
		if (this.attributeNames.contains(attributeName) || this.attributeTypes.contains(attributeType)) {
			return true; 
		else { 
			return false; 
	 * Store a subset of the given attributes in the session. Attributes not 
	 * declared as session attributes via {@code @SessionAttributes} are ignored. 
	 * @param request the current request 
	 * @param attributes candidate attributes for session storage