Package javapersianutils.core.datetime
Class Interval
- java.lang.Object
-
- javapersianutils.core.datetime.Interval
-
public class Interval extends Object
Interval
The Interval which store start and end time of a period- Since:
- 3 /29/2019
- Version:
- 1.0
- Author:
- Mahdi Razavi
-
-
Constructor Summary
Constructors Constructor Description Interval(long begin, long end)
Instantiates a new Interval.Interval(Instant begin, Instant end)
Instantiates a new Interval.Interval(LocalDateTime begin, LocalDateTime end)
Instantiates a new Interval.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getBegin()
Gets begin.Instant
getEnd()
Gets end.void
setBegin(Instant begin)
Sets begin.void
setEnd(Instant end)
Sets end.
-
-
-
Constructor Detail
-
Interval
public Interval(Instant begin, Instant end)
Instantiates a new Interval.- Parameters:
begin
- the beginend
- the end
-
Interval
public Interval(LocalDateTime begin, LocalDateTime end)
Instantiates a new Interval.- Parameters:
begin
- the beginend
- the end
-
Interval
public Interval(long begin, long end)
Instantiates a new Interval.- Parameters:
begin
- the beginend
- the end
-
-
Method Detail
-
getBegin
public Instant getBegin()
Gets begin.- Returns:
- the begin
-
setBegin
public void setBegin(Instant begin)
Sets begin.- Parameters:
begin
- the begin
-
getEnd
public Instant getEnd()
Gets end.- Returns:
- the end
-
setEnd
public void setEnd(Instant end)
Sets end.- Parameters:
end
- the end
-
-