Threshold using a low and max value with ops

I would like to threshold an image according to a lower and upper value.
In IJ1 (e.g. macro language) this would be

setThreshold(lowvalue, highvalue)
run("Convert to Mask")

I have the impression that this functionality is not yet there as currently the ops.threshold().apply(out, in, value) only accept one value.

May be some of you have an hint

I think this operation is equivalent to apply the thresholds separately and subtract the two results (low - high).

yes of course. I was just thinking too complicated. In principle one could wrap such an operation in an ops.