mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-14 10:18:39 +00:00
#107 Callback JavaDoc improvements
This commit is contained in:
1 parent
a0283d60f1
commit
b3b6479f6f
5 files changed
+15
-2
No files matched your search
@@ -1,8 +1,10 @@
|
|||||||
package com.iluwatar.callback;
|
package com.iluwatar.callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback pattern is more native for functional languages where function is treated as first-class citizen.
|
*
|
||||||
* Prior to Java8 can be simulated using simple (alike command) interfaces.
|
* Callback pattern is more native for functional languages where functions are treated as first-class citizens.
|
||||||
|
* Prior to Java 8 callbacks can be simulated using simple (alike command) interfaces.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class App {
|
public class App {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.iluwatar.callback;
|
package com.iluwatar.callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* Callback interface
|
* Callback interface
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public interface Callback {
|
public interface Callback {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.iluwatar.callback;
|
package com.iluwatar.callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* Implementation of task that need to be executed
|
* Implementation of task that need to be executed
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class SimpleTask extends Task {
|
public class SimpleTask extends Task {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.iluwatar.callback;
|
package com.iluwatar.callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* Template-method class for callback hook execution
|
* Template-method class for callback hook execution
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class Task {
|
public abstract class Task {
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import com.iluwatar.callback.App;
|
import com.iluwatar.callback.App;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Application test
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class AppTest {
|
public class AppTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in new issue
Block a user