public class IntervalSet extends Object
Modifier and Type | Field and Description |
---|---|
static IntervalSet |
ALWAYS
The interval set that is always possible.
|
static IntervalSet |
NEVER
The interval set that is never possible.
|
Constructor and Description |
---|
IntervalSet(Interval interval)
Creates a new instance, with a single Interval.
|
IntervalSet(List<Interval> intervals)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
List<Interval> |
getIntervals() |
IntervalSet |
intersect(IntervalSet other) |
boolean |
isValid() |
IntervalSet |
negate() |
public static final IntervalSet NEVER
public static final IntervalSet ALWAYS
public IntervalSet(List<Interval> intervals)
intervals
- the list of intervalspublic IntervalSet(Interval interval)
interval
- the intervalpublic boolean isValid()
public IntervalSet intersect(IntervalSet other)
other
- the other Interval setpublic IntervalSet negate()
Copyright © 2023. All Rights Reserved.