public class Interval extends Object
Constructor and Description |
---|
Interval(int lowerBound,
int upperBound) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double element)
This method checks if the element falls in between the ranges of the interval
|
boolean |
equals(Interval interval)
Checks if the interval equals another one
|
boolean |
equals(int lowerBound,
int upperBound)
Checks if the interval equals the interval created by the handed over bounds
|
int |
getLowerBound() |
int |
getUpperBound() |
String |
toString() |
public boolean contains(double element)
element
- the element the needs to be checkedpublic boolean equals(Interval interval)
interval
- the potentially equal intervalpublic boolean equals(int lowerBound, int upperBound)
lowerBound
- the lower boundupperBound
- the upper boundpublic int getUpperBound()
public int getLowerBound()
Copyright © 2014. All rights reserved.