mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-17 08:03:09 -08:00
Add synchronization to the Standard plugin.
This commit is contained in:
parent
8975bfdb99
commit
7cd117dac1
|
@ -696,8 +696,7 @@ public class StandardPlugin extends Plugin {
|
||||||
* @param n non-negative integer.
|
* @param n non-negative integer.
|
||||||
* @return a number of numClass with value n factorial.
|
* @return a number of numClass with value n factorial.
|
||||||
*/
|
*/
|
||||||
public static NumberInterface factorial(NumberImplementation implementation, int n) {
|
synchronized public static NumberInterface factorial(NumberImplementation implementation, int n) {
|
||||||
|
|
||||||
if (!FACTORIAL_LISTS.containsKey(implementation)) {
|
if (!FACTORIAL_LISTS.containsKey(implementation)) {
|
||||||
FACTORIAL_LISTS.put(implementation, new ArrayList<>());
|
FACTORIAL_LISTS.put(implementation, new ArrayList<>());
|
||||||
FACTORIAL_LISTS.get(implementation).add(implementation.instanceForString("1"));
|
FACTORIAL_LISTS.get(implementation).add(implementation.instanceForString("1"));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user