Ported RangeApplier to java