/*[deutsch]
<p>Schlie&szlig;t die untere Grenze dieses Intervall ein. </p>

@return  changed copy of this interval including lower boundary
@throws  IllegalStateException if the start is infinite past
@since   4.21
15591
public I withClosedStart() {

        if (this.start.isInfinite()) {
            throw new IllegalStateException(
                "Infinite past cannot be included.");
        } else if (this.start.isClosed()) {
            return this.getContext();
        } else {
            Boundary<T> b = Boundary.of(IntervalEdge.CLOSED, this.start.getTemporal());
            return this.getFactory().between(b, this.end);
        }

    }
876565
@GET
  @Path("/{dataSourceName}/intervals/{interval}/serverview")
  @Produces(MediaType.APPLICATION_JSON)
  @ResourceFilters(DatasourceResourceFilter.class)
  public Response getSegmentDataSourceSpecificInterval(
      @PathParam("dataSourceName") String dataSourceName,
      @PathParam("interval") String interval,
      @QueryParam("partial") final boolean partial
  )
  {
    TimelineLookup<String, SegmentLoadInfo> timeline = serverInventoryView.getTimeline(
        new TableDataSource(dataSourceName)
    );
    final Interval theInterval = Intervals.of(interval.replace('_', '/'));
    if (timeline == null) {
      log.debug("No timeline found for datasource[%s]", dataSourceName);
      return Response.ok(new ArrayList<ImmutableSegmentLoadInfo>()).build();
    }

    Iterable<TimelineObjectHolder<String, SegmentLoadInfo>> lookup = timeline.lookupWithIncompletePartitions(theInterval);
    FunctionalIterable<ImmutableSegmentLoadInfo> retval = FunctionalIterable
        .create(lookup).transformCat(
            (TimelineObjectHolder<String, SegmentLoadInfo> input) ->
                Iterables.transform(
                    input.getObject(),
                    (PartitionChunk<SegmentLoadInfo> chunk) ->
                        chunk.getObject().toImmutableSegmentLoadInfo()
                )
        );
    return Response.ok(retval).build();
  }
677833
public ISynchronizationPoint<Exception> startRootElement() {
		ISynchronizationPoint<Exception> start = start();
		if (start.isUnblocked()) {
			if (start.hasError()) return start;
			if (Type.START_ELEMENT.equals(event.type)) return start;
			return nextStartElement();
		}
		SynchronizationPoint<Exception> sp = new SynchronizationPoint<>();
		start.listenAsync(new ParsingTask(() -> {
			if (Type.START_ELEMENT.equals(event.type)) sp.unblock();
			else nextStartElement().listenInline(sp);
		}), sp);
		return sp;
	}
1343576
public Long getPosition() {
        Interval interval = getInterval();
        if (interval != null) {
            return interval.getMinStart();
        } else {
            return null;
        }
    }
1206423
public I withStart(T temporal) {

        IntervalEdge edge = this.start.getEdge();
        Boundary<T> b = Boundary.of(edge, temporal);
        return this.getFactory().between(b, this.end);

    }
1173152
MomentInterval in(Timezone tz) {

        Boundary<Moment> b1;
        Boundary<Moment> b2;

        if (this.getStart().isInfinite()) {
            b1 = Boundary.infinitePast();
        } else {
            Moment m1 = this.getStart().getTemporal().in(tz);
            b1 = Boundary.of(this.getStart().getEdge(), m1);
        }

        if (this.getEnd().isInfinite()) {
            b2 = Boundary.infiniteFuture();
        } else {
            Moment m2 = this.getEnd().getTemporal().in(tz);
            b2 = Boundary.of(this.getEnd().getEdge(), m2);
        }

        return new MomentInterval(b1, b2);

    }
327002
public Interface getMostOriginalObject() {
        Interface origin = getOriginalTarget();
        while (Proxy.isProxyClass(origin.getClass())) {
            origin = (Interface) getProxyBuilder(origin.hashCode()).getOriginalTarget();
        }
        return origin;
    }
1066011
@Override
    ChronoInterval<PlainTime> newInterval(
        Boundary<PlainTime> start,
        Boundary<PlainTime> end
    ) {

        return ClockIntervalFactory.INSTANCE.between(start, end);

    }
1163349
@Override
    ChronoInterval<PlainTimestamp> newInterval(
        Boundary<PlainTimestamp> start,
        Boundary<PlainTimestamp> end
    ) {

        return TimestampIntervalFactory.INSTANCE.between(start, end);

    }
596662
private CompressedISPNChangesBuffer getChangesBufferSafe()
   {
      CompressedISPNChangesBuffer changesContainer = changesList.get();
      if (changesContainer == null)
      {
         throw new IllegalStateException("changesContainer should not be empty");
      }
      return changesContainer;
   }
182037
public static DateInterval since(PlainDate start) {

        Boundary<PlainDate> future = Boundary.infiniteFuture();
        return new DateInterval(Boundary.of(CLOSED, start), future);

    }
611915
public PointList copy(int from, int end) {
        if (from > end)
            throw new IllegalArgumentException("from must be smaller or equal to end");
        if (from < 0 || end > getSize())
            throw new IllegalArgumentException("Illegal interval: " + from + ", " + end + ", size:" + getSize());


        PointList thisPL = this;
        if (this instanceof ShallowImmutablePointList) {
            ShallowImmutablePointList spl = (ShallowImmutablePointList) this;
            thisPL = spl.wrappedPointList;
            from = spl.fromOffset + from;
            end = spl.fromOffset + end;
        }

        int len = end - from;
        PointList copyPL = new PointList(len, is3D());
        copyPL.size = len;
        copyPL.isImmutable = isImmutable();
        System.arraycopy(thisPL.latitudes, from, copyPL.latitudes, 0, len);
        System.arraycopy(thisPL.longitudes, from, copyPL.longitudes, 0, len);
        if (is3D())
            System.arraycopy(thisPL.elevations, from, copyPL.elevations, 0, len);
        return copyPL;
    }
557707
public I withOpenStart() {

        if (this.start.isOpen()) {
            return this.getContext();
        } else {
            Boundary<T> b = Boundary.of(IntervalEdge.OPEN, this.start.getTemporal());
            return this.getFactory().between(b, this.end);
        }

    }
861213
@Override
    public TimestampInterval between(
        Boundary<PlainTimestamp> start,
        Boundary<PlainTimestamp> end
    ) {

        return new TimestampInterval(start, end);

    }
255402
public function relStartLevel(int $relStartLevel = null) {
		if ($this->absStartlevelNo !== null) {
			throw new IllegalStateException('Absolute start level already defined.');
		}
			
		$this->relStartLevelNo = $relStartLevel;
		return $this;
		
	}
386721
public CompletableFuture<Void> requestSegments() {
      return startTransfer(applyState ? StateRequestCommand.Type.START_STATE_TRANSFER : StateRequestCommand.Type.START_CONSISTENCY_CHECK);
   }
429700
@Pure
	public boolean isTemporaryChange() {
		final Object src = getSource();
		if (src instanceof MapLayer) {
			return ((MapLayer) src).isTemporaryLayer();
		}
		return false;
	}