public interface Heading extends OsidPrimitive, java.lang.Comparable<Heading>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Heading heading)
Compares this heading with the specified
Heading
to determine the natural order. |
boolean |
equals(java.lang.Object obj)
Determines if the given
Heading is equal to
this one. |
Heading[] |
getOuterBound()
Gets the outer bounds of the heading.
|
int |
hashCode()
Returns a hash code value for this
Heading. |
boolean |
isExclusive(Heading heading)
Tests if this
Heading, as specified by its
uncertainty, does not overlap the given
Heading. |
boolean |
isInclusive(Heading heading)
Tests if this
Heading, as specified by its
uncertainty, completely includes the given
Heading ranged by its uncertainty. |
toStringboolean isInclusive(Heading heading)
Heading, as specified by its
uncertainty, completely includes the given
Heading ranged by its uncertainty.
If either heading has an uncertainty of infinity this
method returns false.
It is possible for isInclusive() and
isExclsuive() to be both false among
two Headings due to uncertainties in the
values.heading - the heading to comparetrue if this heading includes the given
heading, false otherwiseNullArgumentException - heading
is nullUnsupportedException - cannot compare headingboolean isExclusive(Heading heading)
Heading, as specified by its
uncertainty, does not overlap the given
Heading.
If either heading has an uncertainty of infinity this
method returns false.
It is possible for isInclusive() and
isExclsuive() to be both false among
two Headings due to uncertainties in the
values.heading - the heading to comparetrue if this heading is excluded,
false otherwiseNullArgumentException - heading
is nullUnsupportedException - cannot compare headingHeading[] getOuterBound()
int compareTo(Heading heading)
Heading
to determine the natural order. Returns a negative integer,
zero, or a positive integer as this heading is less than,
equal to, or greater than the specified heading.
The natural ordering is determined first by the natural
ordering of the heading type, then by its values. This method
is not useful for numeric comparisons. The ranges implied by
their granularities and uncertainties may overlap in such a
way that two unequal Headings may be neither less than or
greater than the other.
If compareTo a heading is zero, then
equals() must be true and their hash
codes must also be equal for consistent behavior. For
orderings that may yield inconsistent behavior, an external
Comparator should be used.compareTo in interface java.lang.Comparable<Heading>heading - the heading to be comparedjava.lang.ClassCastException - if the specified heading's type
prevents it from being compared to this headingboolean equals(java.lang.Object obj)
Heading is equal to
this one. Two Headings are equal if their heading
type and values are equal.
If equals() is true, then
compareTo() must be zero and their hash codes
must also be equal for consistent behavior. For orderings that
may yield inconsistent behavior, an external
Comparator should be used.
If obj is null or if a different interface, this
method returns false.equals in class java.lang.Objectobj - an object to compare true if the given object is equal to
this Heading, false
otherwiseint hashCode()
Heading.
The hash code is determined by the heading type and values.hashCode in class java.lang.Object