class RBMBackedTimestampSetInRange extends KoryphePredicate<RBMBackedTimestampSet> {

    @Override
    public boolean test(final RBMBackedTimestampSet rbmBackedTimestampSet) {
        if (rbmBackedTimestampSet == null) {
            throw new IllegalArgumentException("TimestampSet cannot be null");
        }
        if (rbmBackedTimestampSet.getNumberOfTimestamps() == 0) {
            throw new IllegalArgumentException("TimestampSet must contain at least one value");
        }

        Long startEpoch = startTime != null ? startTime.longValue() : null;
        Long endEpoch = endTime != null ? endTime.longValue() : null;
        RBMBackedTimestampSet masked = new MaskTimestampSetByTimeRange(startEpoch, endEpoch, timeUnit).apply(rbmBackedTimestampSet);

        if (includeAllTimestamps) {
            return masked.equals(rbmBackedTimestampSet);
        } else {
            return masked.getNumberOfTimestamps() > 0L;
        }
    }

    public  RBMBackedTimestampSetInRange();
    public  RBMBackedTimestampSetInRange(final Number startTime, final Number endTime);
    public  RBMBackedTimestampSetInRange(final Number startTime, final Number endTime, final TimeUnit timeUnit);
    public  RBMBackedTimestampSetInRange(final Number startTime, final Number endTime, final TimeUnit timeUnit, final Boolean includeAllTimestamps);

}