Class TimeTicksParameters
java.lang.Object
com.amalgamasimulation.charts.axes.ticks.TimeTicksParameters
Class that represents the frequency calculated by time units.
- Author:
- Aleksey Kirillov
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParametersstatic TimeTicksParameters -
Constructor Summary
ConstructorsConstructorDescriptionTimeTicksParameters(int amount, ChronoUnit timeUnit) Constructs a frequency descriptor with a given amount of given time unit. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the amount of time units.Returns the time unit.minusFrom(LocalDateTime localDateTime) Returns a copy of date-time with this amount of this time units subtracted.plusTo(LocalDateTime localDateTime) Returns a copy of date-time with this amount of this time units added.
-
Field Details
-
EVERY_SECOND
-
EVERY_5_SECONDS
-
EVERY_15_SECONDS
-
EVERY_30_SECONDS
-
EVERY_MINUTE
-
EVERY_5_MINUTES
-
EVERY_15_MINUTES
-
EVERY_30_MINUTES
-
EVERY_HOUR
-
EVERY_6_HOURS
-
EVERY_DAY
-
EVERY_WEEK
-
EVERY_MONTH
-
EVERY_YEAR
-
-
Constructor Details
-
TimeTicksParameters
Constructs a frequency descriptor with a given amount of given time unit.- Parameters:
amount- amount of time unitstimeUnit- time unit
-
-
Method Details
-
getAmount
public int getAmount()Returns the amount of time units.- Returns:
- the amount of time units
-
getTimeUnit
Returns the time unit.- Returns:
- time unit
-
plusTo
Returns a copy of date-time with this amount of this time units added.- Parameters:
localDateTime- the date-time to which the addition is made- Returns:
- a copy of date-time with this amount of this time units added
-
minusFrom
Returns a copy of date-time with this amount of this time units subtracted.- Parameters:
localDateTime- the date-time to which the addition is made- Returns:
- a copy of date-time with this amount of this time units subtracted
-