2018-09-02 13:36:49 +02:00
|
|
|
package it.cavallium.warppi.gui.expression.blocks;
|
2017-04-09 22:01:03 +02:00
|
|
|
|
2018-09-02 13:36:49 +02:00
|
|
|
import it.cavallium.warppi.math.Function;
|
|
|
|
import it.cavallium.warppi.math.MathContext;
|
|
|
|
import it.cavallium.warppi.math.parser.features.FeatureParenthesis;
|
|
|
|
import it.cavallium.warppi.math.parser.features.interfaces.Feature;
|
2018-09-12 22:16:33 +02:00
|
|
|
import it.cavallium.warppi.util.Error;
|
2017-11-01 22:34:35 +01:00
|
|
|
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
|
|
|
|
2017-06-25 00:23:49 +02:00
|
|
|
public class BlockParenthesis extends BlockParenthesisAbstract {
|
2018-09-28 11:39:28 +02:00
|
|
|
public BlockParenthesis() {}
|
2017-04-09 22:01:03 +02:00
|
|
|
|
2018-09-22 11:17:30 +02:00
|
|
|
public BlockParenthesis(final ObjectArrayList<Block> blocks) {
|
2017-11-01 22:34:35 +01:00
|
|
|
super(blocks);
|
|
|
|
}
|
|
|
|
|
2017-04-09 22:01:03 +02:00
|
|
|
@Override
|
2018-09-22 11:17:30 +02:00
|
|
|
public Feature toFeature(final MathContext context) throws Error {
|
2017-05-26 22:37:18 +02:00
|
|
|
final Function cont = getNumberContainer().toFunction(context);
|
|
|
|
return new FeatureParenthesis(cont);
|
2017-04-09 22:01:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|