Class Boundary<T>
- Type Parameters:
T- generic temporal type
- All Implemented Interfaces:
Serializable
Represents an interval boundary, either the lower one or the upper one.
- Since:
- 2.0
- Author:
- Meno Hochschild
- See Also:
- Serialized Form
-
Method Summary
Modifier and TypeMethodDescriptionbooleanYields the time point of this interval boundary.inthashCode()static <T> Boundary<T>Defines a symbolic open boundary for the infinite future.static <T> Boundary<T>Defines a symbolic open boundary for the infinite past.booleanisClosed()Determines if this boundary is closed.booleanDetermines if this boundary is infinite.booleanisOpen()Determines if this boundary is open.static <T> Boundary<T>ofClosed(T temporal)Defines a finite closed boundary for the specified time point.static <T> Boundary<T>ofOpen(T temporal)Defines a finite open boundary for the specified time point.toString()Yields a descriptive string.
-
Method Details
-
infinitePast
Defines a symbolic open boundary for the infinite past.
- Type Parameters:
T- generic temporal type- Returns:
- open boundary in infinite past without defined time
- Since:
- 2.0
-
infiniteFuture
Defines a symbolic open boundary for the infinite future.
- Type Parameters:
T- generic temporal type- Returns:
- open boundary in infinite future without defined time
- Since:
- 2.0
-
ofOpen
Defines a finite open boundary for the specified time point.
- Type Parameters:
T- generic temporal type- Parameters:
temporal- time of the boundary- Returns:
- finite open boundary
- Since:
- 2.0
- See Also:
infinitePast(),infiniteFuture(),isOpen()
-
ofClosed
Defines a finite closed boundary for the specified time point.
- Type Parameters:
T- generic temporal type- Parameters:
temporal- time of the boundary- Returns:
- finite closed boundary
- Since:
- 2.0
- See Also:
infinitePast(),infiniteFuture(),isClosed()
-
getTemporal
Yields the time point of this interval boundary.
- Returns:
- time point or
nullif infinite - Since:
- 2.0
- See Also:
isInfinite()
-
isOpen
public boolean isOpen()Determines if this boundary is open.
If open then the associated time point does not belong to a given interval with this boundary.
- Returns:
trueif open elsefalse- Since:
- 2.0
- See Also:
ofOpen(T)
-
isClosed
public boolean isClosed()Determines if this boundary is closed.
If closed then the associated time point belongs to a given interval with this boundary.
- Returns:
trueif closed elsefalse- Since:
- 2.0
- See Also:
ofClosed(T)
-
isInfinite
public boolean isInfinite()Determines if this boundary is infinite.
If infinite then the associated time point is not defined.
- Returns:
trueif infinite elsefalse- Since:
- 2.0
- See Also:
getTemporal()
-
equals
-
hashCode
public int hashCode() -
toString
Yields a descriptive string.
-