/** * Represents a [n..m] construct */ public static RangeImpl range( EvaluationContext ctx, Range.RangeBoundary lowBoundary, Object lowEndPoint, Object highEndPoint, Range.RangeBoundary highBoundary) { Comparable left = asComparable(lowEndPoint); Comparable right = asComparable(highEndPoint); if (left == null || right == null || !compatible(left, right)) { ctx.notifyEvt(() -> new ASTEventBase( FEELEvent.Severity.ERROR, Msg.createMessage( Msg.INCOMPATIBLE_TYPE_FOR_RANGE, left.getClass().getSimpleName() ), null)); return null; } return new RangeImpl( lowBoundary, left, right, highBoundary); }