issue #333 review changes
This commit is contained in:
		@@ -11,7 +11,7 @@ tags:
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
## Intent
 | 
			
		||||
Define factory of immutable content with separated builder and factory interfaces.
 | 
			
		||||
Define a factory of immutable content with separated builder and factory interfaces.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,18 @@
 | 
			
		||||
package com.iluwatar.factorykit;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Factory-kit is a creational pattern which defines a factory of immutable content
 | 
			
		||||
 * with separated builder and factory interfaces to deal with the problem of
 | 
			
		||||
 * creating one of the objects specified directly in the factory-kit instance.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>
 | 
			
		||||
 * In the given example {@link WeaponFactory} represents the factory-kit, that contains
 | 
			
		||||
 * four {@link Builder}s for creating new objects of
 | 
			
		||||
 * the classes implementing {@link Weapon} interface.
 | 
			
		||||
 * <br>Each of them can be called with {@link WeaponFactory#create(WeaponType)} method, with
 | 
			
		||||
 * an input representing an instance of {@link WeaponType} that needs to
 | 
			
		||||
 * be mapped explicitly with desired class type in the factory instance.
 | 
			
		||||
 */
 | 
			
		||||
public class App {
 | 
			
		||||
  /**
 | 
			
		||||
   * Program entry point.
 | 
			
		||||
 
 | 
			
		||||
@@ -93,7 +93,7 @@ public class FactoryMethodTest {
 | 
			
		||||
   * @param expectedWeaponType expected WeaponType of the weapon
 | 
			
		||||
   * @param clazz expected class of the weapon
 | 
			
		||||
   */
 | 
			
		||||
  private void verifyWeapon(Weapon weapon, WeaponType expectedWeaponType, Class clazz) {
 | 
			
		||||
  private void verifyWeapon(Weapon weapon, WeaponType expectedWeaponType, Class<?> clazz) {
 | 
			
		||||
    assertTrue("Weapon must be an object of: " + clazz.getName(), clazz.isInstance(weapon));
 | 
			
		||||
    assertEquals("Weapon must be of weaponType: " + clazz.getName(), expectedWeaponType,
 | 
			
		||||
        weapon.getWeaponType());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user