All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstack4j.common.Buildable Maven / Gradle / Ivy

There is a newer version: 3.12
Show newest version
package org.openstack4j.common;


/**
 * Model classes decorated with this interface are compatible for write/update operations and can be created via the Builder API.  
 * 
 * @author Jeremy Unruh
 */
public interface Buildable {

	B toBuilder();
	
	/**
	 * Builder used to create/build corresponding Model Entity 
	 * 
	 * @param  The Builder providing the creation of M
	 * @param  The ouput IModelEntity type
	 * 
	 * @author Jeremy Unruh
	 */
	public interface Builder, M extends Buildable> {

		/**
		 * Creates and return the Model Entity M
		 *
		 * @return M instance
		 */
		M build();
		
		/**
		 * Creates a Builder using the param M as the default values
		 *
		 * @param The Model M
		 * @return Builder
		 */
		 T from(M in);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy