#107 Improve Prototype JavaDoc

This commit is contained in:
Ilkka Seppala 2015-08-21 22:41:33 +03:00
parent c32246e41d
commit 8fb0ec1bf9
2 changed files with 16 additions and 4 deletions

View File

@ -3,14 +3,21 @@ package com.iluwatar.property;
import com.iluwatar.property.Character.Type; import com.iluwatar.property.Character.Type;
/** /**
* Example of Character instantiation using Property pattern (as concept also known like Prototype inheritance). *
* Example of {@link Character} instantiation using the Property pattern (also known as Prototype inheritance).
* <p>
* In prototype inheritance instead of classes, as opposite to Java class inheritance, * In prototype inheritance instead of classes, as opposite to Java class inheritance,
* objects are used to create another objects and object hierarchies. * objects are used to create another objects and object hierarchies. Hierarchies are created using prototype chain
* Hierarchies are created using prototype chain through delegation: every object has link to parent object. * through delegation: every object has link to parent object. Any base (parent) object can be amended at runtime
* Any base (parent) object can be amended at runtime (by adding or removal of some property), and all child objects will be affected as result. * (by adding or removal of some property), and all child objects will be affected as result.
*
*/ */
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) {
/* set up */ /* set up */
Prototype charProto = new Character(); Prototype charProto = new Character();

View File

@ -4,6 +4,11 @@ import org.junit.Test;
import com.iluwatar.property.App; import com.iluwatar.property.App;
/**
*
* Application test
*
*/
public class AppTest { public class AppTest {
@Test @Test