public TimePartitionRange rangeFrom(TimePartition from) throws LensException { return new TimePartitionRange(from, this); }
public TimePartitionRange rangeUpto(TimePartition to) throws LensException { return new TimePartitionRange(this, to); }
public TimePartitionRange rangeFrom(TimePartition from) throws LensException { return new TimePartitionRange(from, this); }
public TimePartitionRange rangeUpto(TimePartition to) throws LensException { return new TimePartitionRange(this, to); }
public static TimePartitionRange parseFrom(UpdatePeriod updatePeriod, String from, String to) throws LensException { boolean incrementFrom = false; boolean incrementTo = false; if (from.charAt(0) == '[') { from = from.substring(1); } else if (from.charAt(0) == '(') { from = from.substring(1); incrementFrom = true; } if (to.charAt(to.length() - 1) == ']') { to = to.substring(0, to.length() - 1); incrementTo = true; } else if (to.charAt(to.length() - 1) == ')') { to = to.substring(0, to.length() - 1); } TimePartition fromPartition = TimePartition.of(updatePeriod, from); TimePartition toPartition = TimePartition.of(updatePeriod, to); if (incrementFrom) { fromPartition = fromPartition.next(); } if (incrementTo) { toPartition = toPartition.next(); } return new TimePartitionRange(fromPartition, toPartition); }
public static TimePartitionRange parseFrom(UpdatePeriod updatePeriod, String from, String to) throws LensException { boolean incrementFrom = false; boolean incrementTo = false; if (from.charAt(0) == '[') { from = from.substring(1); } else if (from.charAt(0) == '(') { from = from.substring(1); incrementFrom = true; } if (to.charAt(to.length() - 1) == ']') { to = to.substring(0, to.length() - 1); incrementTo = true; } else if (to.charAt(to.length() - 1) == ')') { to = to.substring(0, to.length() - 1); } TimePartition fromPartition = TimePartition.of(updatePeriod, from); TimePartition toPartition = TimePartition.of(updatePeriod, to); if (incrementFrom) { fromPartition = fromPartition.next(); } if (incrementTo) { toPartition = toPartition.next(); } return new TimePartitionRange(fromPartition, toPartition); }