Merge pull request #8125 from eugenp/revert-8119-BAEL-3275-2

Revert "BAEL-3275: Using blocking queue for pub-sub"
This commit is contained in:
Eric Martin
2019-10-31 20:43:47 -05:00
committed by GitHub
parent db85c8f275
commit 3225470df5
20543 changed files with 1642750 additions and 0 deletions
@@ -0,0 +1,17 @@
/**
*
*/
package com.baeldung.abstractclass.abstractmethod;
/**
* When method calls abstract method.
*/
public abstract class AbstractMethodCalling {
public abstract String abstractFunc();
public String defaultImpl() {
String res = abstractFunc();
return (res == null) ? "Default" : (res + " Default");
}
}
@@ -0,0 +1,14 @@
package com.baeldung.abstractclass.indepedentmethod;
/**
* Test Independent Method
*
*/
public abstract class AbstractIndependent {
public abstract int abstractFunc();
public String defaultImpl() {
return "DEFAULT-1";
}
}
@@ -0,0 +1,10 @@
package com.baeldung.abstractclass.indepedentmethod;
public class ConcreteImpl extends AbstractIndependent {
@Override
public int abstractFunc() {
return 4;
}
}
@@ -0,0 +1,22 @@
package com.baeldung.abstractclass.instancefields;
/**
* Test Independent Method
*/
public abstract class AbstractInstanceFields {
protected int count;
private boolean active = false;
public abstract int abstractFunc();
public String testFunc() {
String response;
if (count > 5) {
response = "Overflow";
} else {
response = active ? "Added" : "Blocked";
}
return response;
}
}
@@ -0,0 +1,17 @@
package com.baeldung.abstractclass.privatemethod;
import java.time.LocalDateTime;
public abstract class AbstractPrivateMethods {
public abstract int abstractFunc();
public String defaultImpl() {
return getCurrentDateTime() + "DEFAULT-1";
}
private String getCurrentDateTime() {
return LocalDateTime.now()
.toString();
}
}