use of uk.gov.gchq.gaffer.time.function.MaskTimestampSetByTimeRange in project Gaffer by gchq.
the class RBMBackedTimestampSetInRange method test.
@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;
}
}
Aggregations