org.jfree.chart.axis

Class SegmentedTimeline.SegmentRange

protected class SegmentedTimeline.SegmentRange extends SegmentedTimeline.Segment

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.
Constructor Summary
SegmentRange(long fromMillisecond, long toMillisecond)
Creates a SegmentRange between a start and end domain values.
Method Summary
longgetSegmentCount()
Returns the number of segments contained in this range.
voidinc(long n)
Not implemented for SegmentRange.
booleaninExcludeSegments()
Returns true if we are an excluded segment.
booleaninIncludeSegments()
Returns true if all Segments of this SegmentRenge are an included segment and are not an exception.
SegmentedTimeline.Segmentintersect(long from, long to)
Returns a segment that is the intersection of this segment and the interval.

Constructor Detail

SegmentRange

public SegmentRange(long fromMillisecond, long toMillisecond)
Creates a SegmentRange between a start and end domain values.

Parameters: fromMillisecond start of the range toMillisecond end of the range

Method Detail

getSegmentCount

public long getSegmentCount()
Returns the number of segments contained in this range.

Returns: The segment count.

inc

public void inc(long n)
Not implemented for SegmentRange. Always throws IllegalArgumentException.

Parameters: n Number of segments to increment.

inExcludeSegments

public boolean inExcludeSegments()
Returns true if we are an excluded segment.

Returns: true or false.

inIncludeSegments

public boolean inIncludeSegments()
Returns true if all Segments of this SegmentRenge are an included segment and are not an exception.

Returns: true or false.

intersect

public SegmentedTimeline.Segment intersect(long from, long to)
Returns a segment that is the intersection of this segment and the interval.

Parameters: from the start of the interval. to the end of the interval.

Returns: The intersection.