#107 Improve JavaDoc for Prototype
This commit is contained in:
@ -2,13 +2,17 @@ package com.iluwatar.prototype;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* In Prototype we have a factory class (HeroFactoryImpl) producing objects by
|
* In Prototype we have a factory class ({@link HeroFactoryImpl}) producing objects by
|
||||||
* cloning existing ones. In this example the factory's prototype objects are
|
* cloning the existing ones. In this example the factory's prototype objects are
|
||||||
* given as constructor parameters.
|
* given as constructor parameters.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class App {
|
public class App {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Program entry point
|
||||||
|
* @param args command line args
|
||||||
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
HeroFactory factory;
|
HeroFactory factory;
|
||||||
Mage mage;
|
Mage mage;
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Beast
|
||||||
|
*
|
||||||
|
*/
|
||||||
public abstract class Beast extends Prototype {
|
public abstract class Beast extends Prototype {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* ElfBeast
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class ElfBeast extends Beast {
|
public class ElfBeast extends Beast {
|
||||||
|
|
||||||
public ElfBeast() {
|
public ElfBeast() {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* ElfMage
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class ElfMage extends Mage {
|
public class ElfMage extends Mage {
|
||||||
|
|
||||||
public ElfMage() {
|
public ElfMage() {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* ElfWarlord
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class ElfWarlord extends Warlord {
|
public class ElfWarlord extends Warlord {
|
||||||
|
|
||||||
public ElfWarlord() {
|
public ElfWarlord() {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Mage
|
||||||
|
*
|
||||||
|
*/
|
||||||
public abstract class Mage extends Prototype {
|
public abstract class Mage extends Prototype {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* OrcBeast
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class OrcBeast extends Beast {
|
public class OrcBeast extends Beast {
|
||||||
|
|
||||||
public OrcBeast() {
|
public OrcBeast() {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* OrcMage
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class OrcMage extends Mage {
|
public class OrcMage extends Mage {
|
||||||
|
|
||||||
public OrcMage() {
|
public OrcMage() {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* OrcWarlord
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class OrcWarlord extends Warlord {
|
public class OrcWarlord extends Warlord {
|
||||||
|
|
||||||
public OrcWarlord() {
|
public OrcWarlord() {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Prototype
|
||||||
|
*
|
||||||
|
*/
|
||||||
public abstract class Prototype implements Cloneable {
|
public abstract class Prototype implements Cloneable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar.prototype;
|
package com.iluwatar.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Warlord
|
||||||
|
*
|
||||||
|
*/
|
||||||
public abstract class Warlord extends Prototype {
|
public abstract class Warlord extends Prototype {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -4,6 +4,11 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import com.iluwatar.prototype.App;
|
import com.iluwatar.prototype.App;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Application test
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class AppTest {
|
public class AppTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user