Enum Class IntervalRelation
- All Implemented Interfaces:
Serializable,Comparable<IntervalRelation>,java.lang.constant.Constable
Represents an Allen-relation between two intervals.
Given any two intervals, there is always a unique and distinct relation between them without ambivalence. There are 13 possible relations.
| precedes | ![]() |
| meets | ![]() |
| overlaps | ![]() |
| finishedBy | ![]() |
| encloses | ![]() |
| starts | ![]() |
| equivalent | ![]() |
| startedBy | ![]() |
| enclosedBy | ![]() |
| finishes | ![]() |
| overlappedBy | ![]() |
| metBy | ![]() |
| precededBy | ![]() |
Further explanations can be found at the website of Allen's interval algebra.
- Since:
- 2.0
- Author:
- Meno Hochschild
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic IntervalRelationbetween(ClockInterval a, ClockInterval b)Determines the relation between given intervals.static IntervalRelationbetween(DateInterval a, DateInterval b)Determines the relation between given intervals.static IntervalRelationbetween(MomentInterval a, MomentInterval b)Determines the relation between given intervals.static IntervalRelationDetermines the relation between given intervals.inverse()Determines the opposite relation.booleanmatches(ClockInterval a, ClockInterval b)Does this relation match the relation between given intervals?booleanmatches(DateInterval a, DateInterval b)Does this relation match the relation between given intervals?booleanmatches(MomentInterval a, MomentInterval b)Does this relation match the relation between given intervals?booleanDoes this relation match the relation between given intervals?static IntervalRelationReturns the enum constant of this class with the specified name.static IntervalRelation[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
PRECEDES
-
MEETS
-
OVERLAPS
-
FINISHES
-
STARTS
-
ENCLOSES
-
EQUIVALENT
-
ENCLOSED_BY
-
STARTED_BY
-
FINISHED_BY
-
OVERLAPPED_BY
-
MET_BY
-
PRECEDED_BY
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
inverse
Determines the opposite relation.
- Returns:
- opposite relation
- Since:
- 2.0
-
matches
Does this relation match the relation between given intervals?
- Parameters:
a- first intervalb- second interval- Returns:
trueif both intervals have this relation to each other elsefalse- Since:
- 2.0
-
matches
Does this relation match the relation between given intervals?
- Parameters:
a- first intervalb- second interval- Returns:
trueif both intervals have this relation to each other elsefalse- Since:
- 2.0
-
matches
Does this relation match the relation between given intervals?
- Parameters:
a- first intervalb- second interval- Returns:
trueif both intervals have this relation to each other elsefalse- Since:
- 2.0
-
matches
Does this relation match the relation between given intervals?
- Parameters:
a- first intervalb- second interval- Returns:
trueif both intervals have this relation to each other elsefalse- Since:
- 2.0
-
between
Determines the relation between given intervals.
- Parameters:
a- first intervalb- second interval- Returns:
- relation between given intervals
- Since:
- 2.0
-
between
Determines the relation between given intervals.
- Parameters:
a- first intervalb- second interval- Returns:
- relation between given intervals
- Since:
- 2.0
-
between
Determines the relation between given intervals.
- Parameters:
a- first intervalb- second interval- Returns:
- relation between given intervals
- Since:
- 2.0
-
between
Determines the relation between given intervals.
- Parameters:
a- first intervalb- second interval- Returns:
- relation between given intervals
- Since:
- 2.0
-












