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