public class Interval
extends java.lang.Object
Constructor and Description |
---|
Interval(java.lang.Object lowEndpoint,
java.lang.Object highEndpoint)
It is required that the low endpoint be less than or equal to
the high endpoint according to the Comparator which will be
passed into the overlaps() routines.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getHighEndpoint() |
java.lang.Object |
getLowEndpoint() |
boolean |
overlaps(Interval arg,
java.util.Comparator endpointComparator)
This takes the Interval to compare against as well as a
Comparator which will be applied to the low and high endpoints
of the given intervals.
|
boolean |
overlaps(java.lang.Object otherLowEndpoint,
java.lang.Object otherHighEndpoint,
java.util.Comparator endpointComparator)
Routine which can be used instead of the one taking an interval,
for the situation where the endpoints are being retrieved from
different data structures
|
java.lang.String |
toString() |
public Interval(java.lang.Object lowEndpoint, java.lang.Object highEndpoint)
public java.lang.Object getLowEndpoint()
public java.lang.Object getHighEndpoint()
public boolean overlaps(Interval arg, java.util.Comparator endpointComparator)
public boolean overlaps(java.lang.Object otherLowEndpoint, java.lang.Object otherHighEndpoint, java.util.Comparator endpointComparator)
public java.lang.String toString()
toString
in class java.lang.Object
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.