Code example for PersistentSet

0
	public Class getReturnedClass() { 
		return java.util.Set.class; 
	} 
 
	public PersistentCollection wrap(SessionImplementor session, Object collection) { 
		return new PersistentSet( session, (java.util.Set) collection ); 
	} 
 
	public Object instantiate(int anticipatedSize) { 
		return anticipatedSize <= 0 
		       ? new HashSet() 
		       : new HashSet( anticipatedSize + (int)( anticipatedSize * .75f ), .75f ); 
	} 
	 
}