mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 06:14:07 +00:00
Finished Thread Pool example code.
This commit is contained in:
1 parent
4c0a300b86
commit
6e76227143
5 files changed
+111
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class CoffeeMakingTask extends Task {
|
||||
|
||||
private static int TIME_PER_CUP = 300;
|
||||
|
||||
public CoffeeMakingTask(int numCups) {
|
||||
super(numCups * TIME_PER_CUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s %s", this.getClass().getSimpleName(), super.toString());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user