Package org.midheaven.math
Interface Interval<T>
- Type Parameters:
T- the type of element in the Interval
public interface Interval<T>
Defines the contract for Interval.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptiondefault <R> RPerforms apply.booleanPerforms contains.booleanPerforms contains.static <C> Interval<C> empty()An empty interval.booleanintersects(Interval<T> other) Performs intersects.booleanisEmpty()Checks whether is Empty.maximum()Performs maximum.minimum()Performs minimum.static <C extends Comparable<C>>
IntervalBuilder<C, C> Performs ranging.static <C> IntervalBuilder<C, C> ranging(Comparator<C> comparator) Performs ranging.static <C,S> IntervalBuilder <C, S> ranging(Interval.Domain<C, S> order) Performs ranging.
-
Method Details
-
ranging
Performs ranging.- Parameters:
type- the type value- Returns:
- the result of ranging
-
ranging
Performs ranging.- Parameters:
order- the order value- Returns:
- the result of ranging
-
ranging
Performs ranging.- Parameters:
comparator- the comparator value- Returns:
- the result of ranging
-
empty
An empty interval.- Type Parameters:
C-- Returns:
-
minimum
Interval.Boundary<T> minimum()Performs minimum.- Returns:
- the result of minimum
-
maximum
Interval.Boundary<T> maximum()Performs maximum.- Returns:
- the result of maximum
-
isEmpty
boolean isEmpty()Checks whether is Empty.- Returns:
- the result of isEmpty
-
contains
Performs contains.- Parameters:
other- the other value- Returns:
- the result of contains
-
intersects
Performs intersects.- Parameters:
other- the other value- Returns:
- the result of intersects
-
contains
Performs contains.- Parameters:
other- the other value- Returns:
- the result of contains
-
apply
Performs apply.- Parameters:
calculation- the calculation value- Returns:
- the result of apply
-