Class InputInterval.Segment
- java.lang.Object
-
- io.engineblock.activityimpl.input.InputInterval.Segment
-
- All Implemented Interfaces:
CycleSegment
- Enclosing class:
- InputInterval
public static class InputInterval.Segment extends java.lang.Object implements CycleSegment
-
-
Constructor Summary
Constructors Constructor Description Segment(long start, long afterEnd)
-
Method Summary
Modifier and Type Method Description booleanisExhausted()longnextCycle()The next cycle, which should be a positive number between 0 and Long.MAX_VALUE.longpeekNextCycle()Return the value of the next cycle which would be returned byCycleSegment.nextCycle()} without modifying the segment, or a negative number if the cycle range would be outside the valid range for this segment.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.engineblock.activityapi.cyclelog.buffers.results.CycleSegment
nextCycles
-
-
-
-
Method Detail
-
nextCycle
public long nextCycle()
Description copied from interface:CycleSegmentThe next cycle, which should be a positive number between 0 and Long.MAX_VALUE. If a negative value is returned, then the caller should disregard the value and assume that any further input segments will be invalid.Implementations of this method should not worry about thread safety.
- Specified by:
nextCyclein interfaceCycleSegment- Returns:
- a positive and valid long cycle, or a negative indicator of end of input
-
peekNextCycle
public long peekNextCycle()
Description copied from interface:CycleSegmentReturn the value of the next cycle which would be returned byCycleSegment.nextCycle()} without modifying the segment, or a negative number if the cycle range would be outside the valid range for this segment.- Specified by:
peekNextCyclein interfaceCycleSegment- Returns:
- the next cycle that will be returned
-
isExhausted
public boolean isExhausted()
- Specified by:
isExhaustedin interfaceCycleSegment- Returns:
- true if the input can provide no further cycles
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-