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 ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic IntervalRelation
between(ClockInterval a, ClockInterval b)
Determines the relation between given intervals.static IntervalRelation
between(DateInterval a, DateInterval b)
Determines the relation between given intervals.static IntervalRelation
between(MomentInterval a, MomentInterval b)
Determines the relation between given intervals.static IntervalRelation
Determines the relation between given intervals.inverse()
Determines the opposite relation.boolean
matches(ClockInterval a, ClockInterval b)
Does this relation match the relation between given intervals?boolean
matches(DateInterval a, DateInterval b)
Does this relation match the relation between given intervals?boolean
matches(MomentInterval a, MomentInterval b)
Does this relation match the relation between given intervals?boolean
Does this relation match the relation between given intervals?static IntervalRelation
Returns 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:
true
if 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:
true
if 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:
true
if 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:
true
if 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
-