class BagDataType extends CollectionDataType {

	public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) {
		Ensure.not_null(inner);
		Ensure.not_null(pscope);
		Ensure.is_true(inner.in_scope(pscope));
		
		DataTypeScope scope = inner.parent_dts();
		DataType found = null;
		try {
			found = scope.find(build_bag_name(inner));
		} catch (AmbiguousNameException e) {
			/*
			 * No set found.
			 */
		}
		
		if (found == null) {
			found = new BagDataType(inner, pscope.any());
			scope.add(found);
		}
		
		Ensure.not_null(found);
		Ensure.is_instance(found, BagDataType.class);
		return (BagDataType) found;
	}

	public  BagDataType(DataType inner_type, AnyType any);

}