Package org.jfree.chart.axis
Class SegmentedTimeline.SegmentRange
java.lang.Object
org.jfree.chart.axis.SegmentedTimeline.Segment
org.jfree.chart.axis.SegmentedTimeline.SegmentRange
- All Implemented Interfaces:
Serializable,Cloneable,Comparable
- Direct Known Subclasses:
SegmentedTimeline.BaseTimelineSegmentRange
- Enclosing class:
- SegmentedTimeline
Private internal class to represent a range of segments. This class is
mainly used to store in one object a range of exception segments. This
optimizes certain timelines that use a small segment size (like an
intraday timeline) allowing them to express a day exception as one
SegmentRange instead of multi Segments.
- See Also:
-
Field Summary
Fields inherited from class org.jfree.chart.axis.SegmentedTimeline.Segment
millisecond, segmentEnd, segmentNumber, segmentStart -
Constructor Summary
ConstructorsConstructorDescriptionSegmentRange(long fromMillisecond, long toMillisecond) Creates a SegmentRange between a start and end domain values. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the number of segments contained in this range.voidinc(long n) Not implemented for SegmentRange.booleanReturns true if we are an excluded segment.booleanReturns true if all Segments of this SegmentRenge are an included segment and are not an exception.intersect(long from, long to) Returns a segment that is the intersection of this segment and the interval.Methods inherited from class org.jfree.chart.axis.SegmentedTimeline.Segment
after, before, calculateSegmentNumber, compareTo, contained, contains, contains, contains, copy, dec, dec, equals, getDate, getMillisecond, getSegmentEnd, getSegmentNumber, getSegmentStart, inc, inExceptionSegments, moveIndexToEnd, moveIndexToStart
-
Constructor Details
-
SegmentRange
Creates a SegmentRange between a start and end domain values.- Parameters:
fromMillisecond- start of the rangetoMillisecond- end of the range
-
-
Method Details
-
getSegmentCount
Returns the number of segments contained in this range.- Overrides:
getSegmentCountin classSegmentedTimeline.Segment- Returns:
- The segment count.
-
intersect
Returns a segment that is the intersection of this segment and the interval.- Overrides:
intersectin classSegmentedTimeline.Segment- Parameters:
from- the start of the interval.to- the end of the interval.- Returns:
- The intersection.
-
inIncludeSegments
Returns true if all Segments of this SegmentRenge are an included segment and are not an exception.- Overrides:
inIncludeSegmentsin classSegmentedTimeline.Segment- Returns:
trueorfalse.
-
inExcludeSegments
Returns true if we are an excluded segment.- Overrides:
inExcludeSegmentsin classSegmentedTimeline.Segment- Returns:
trueorfalse.
-
inc
Not implemented for SegmentRange. Always throws IllegalArgumentException.- Overrides:
incin classSegmentedTimeline.Segment- Parameters:
n- Number of segments to increment.
-