Modifier and Type | Field and Description |
---|---|
int |
max
It specifies the maximal value in the interval.
|
int |
min
It specifies the minimal value in the interval.
|
Constructor and Description |
---|
Interval()
It creates the largest possible interval.
|
Interval(int min,
int max)
It creates an interval with a given minimum and maximal value.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
eq(Interval interval)
It checks equality between intervals.
|
int |
max()
It returns the right bound of the interval (maximum value).
|
int |
min()
It returns the left range of the interval (minimum value).
|
boolean |
singleton()
It checks if an intervals contains only one value (singleton).
|
boolean |
singleton(int c)
It checks if an intervals contains only value c.
|
String |
toString() |
public final int min
public final int max
public Interval()
public Interval(int min, int max)
min
- the minimal value in the interval (the left bound).max
- the maximal value in the interval (the right bound).public boolean eq(Interval interval)
interval
- the inerval to which the comparison is made.public int max()
public int min()
public boolean singleton()
public boolean singleton(int c)
c
- integer value to which the singleton is compared to.Copyright © 2022. All rights reserved.