mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 06:58:41 +00:00
Finished Thread Pool example code.
This commit is contained in:
@@ -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