A B C D E F G H I L N P R S T U V
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- advance() - Method in class com.pervasivecode.utils.time.testing.FakeTimeSource
-
Advance the fake value representing the "current" time by an unspecified, fixed amount.
- advance(Duration) - Method in class com.pervasivecode.utils.time.testing.FakeTimeSource
-
Advance the fake value representing the "current" time by a fixed amount specified by the caller.
B
- build() - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
-
Create an instance of
DurationFormat
from this builder instance. - builder() - Static method in class com.pervasivecode.utils.time.DurationFormat
-
Create an object that will build a
DurationFormatter
instance. - builder(DurationFormat) - Static method in class com.pervasivecode.utils.time.DurationFormat
-
Create an object that will build a
DurationFormatter
instance.
C
- com.pervasivecode.utils.time - package com.pervasivecode.utils.time
- com.pervasivecode.utils.time.testing - package com.pervasivecode.utils.time.testing
- CurrentNanosSource - Interface in com.pervasivecode.utils.time
-
An object that provides the current time since the Unix epoch, with nanosecond precision.
- currentTimeNanoPrecision() - Method in interface com.pervasivecode.utils.time.CurrentNanosSource
-
Obtain the current time since the Unix epoch, with nanosecond precision.
- currentTimeNanoPrecision() - Method in class com.pervasivecode.utils.time.testing.FakeNanoSource
-
Return the stored fake "current" time value, and increment the stored value by 1.
D
- DurationFormat - Class in com.pervasivecode.utils.time
-
This object holds configuration information for a
DurationFormatter
instance. - DurationFormat.Builder - Class in com.pervasivecode.utils.time
-
This object will build a
DurationFormat
instance. - DurationFormats - Class in com.pervasivecode.utils.time
-
Factory methods for DurationFormat instances.
- DurationFormatter - Class in com.pervasivecode.utils.time
-
Formatter for a
Duration
value. - DurationFormatter(DurationFormat) - Constructor for class com.pervasivecode.utils.time.DurationFormatter
-
Create a DurationFormatter.
- DurationRemainderHandling - Enum in com.pervasivecode.utils.time
-
Strategies for formatting
Duration
s that have a remainder smaller than the smallest unit of time that will be shown.
E
- elapsedSoFar() - Method in class com.pervasivecode.utils.time.testing.FakeTimeSource
-
Return the amount of time between the internal initial fake time value when this instance was created, and the internal current fake time value stored by this instance.
- equals(Object) - Method in class com.pervasivecode.utils.time.DurationFormatter
- equals(Object) - Method in class com.pervasivecode.utils.time.SimplePeriodicRunner
- equals(Object) - Method in class com.pervasivecode.utils.time.SimplePeriodicRunnerFactory
- equals(Object) - Method in class com.pervasivecode.utils.time.testing.FakeNanoSource
- equals(Object) - Method in class com.pervasivecode.utils.time.testing.FakePeriodicRunner
- equals(Object) - Method in class com.pervasivecode.utils.time.testing.FakeTimeSource
F
- FakeNanoSource - Class in com.pervasivecode.utils.time.testing
-
This is a fake implementation of
CurrentNanosSource
, intended for use by test code. - FakeNanoSource() - Constructor for class com.pervasivecode.utils.time.testing.FakeNanoSource
- FakePeriodicRunner - Class in com.pervasivecode.utils.time.testing
-
This is a fake implementation of
PeriodicRunner
, intended for use by test code. - FakePeriodicRunner() - Constructor for class com.pervasivecode.utils.time.testing.FakePeriodicRunner
- FakeTimeSource - Class in com.pervasivecode.utils.time.testing
-
This is a fake implementation of
TimeSource
, intended for use by test code. - FakeTimeSource() - Constructor for class com.pervasivecode.utils.time.testing.FakeTimeSource
-
Create a
FakeTimeSource
instance that automatically advances the time value each timeFakeTimeSource.now()
is called. - FakeTimeSource(boolean) - Constructor for class com.pervasivecode.utils.time.testing.FakeTimeSource
-
Create a
FakeTimeSource
instance. - fixedSuffixPerUnit(Map<ChronoUnit, String>) - Static method in class com.pervasivecode.utils.time.UnitSuffixProviders
-
Get a UnitSuffixProvider that provides unit suffixes that are fixed regardless of the magnitude of the value being formatted.
- format(Duration) - Method in class com.pervasivecode.utils.time.DurationFormatter
-
Format a Duration.
G
- getRunnerForInterval(Duration) - Method in class com.pervasivecode.utils.time.SimplePeriodicRunnerFactory
-
Get an instance of a
SimplePeriodicRunner
that will allow aRunnable
to be executed at the rate specified via the executionInterval. - getUsDefaultInstance() - Static method in class com.pervasivecode.utils.time.DurationFormats
-
DurationFormat for US locales, using units from nanoseconds up to years, without fractions.
H
- hashCode() - Method in class com.pervasivecode.utils.time.DurationFormatter
- hashCode() - Method in class com.pervasivecode.utils.time.SimplePeriodicRunner
- hashCode() - Method in class com.pervasivecode.utils.time.SimplePeriodicRunnerFactory
- hashCode() - Method in class com.pervasivecode.utils.time.testing.FakeNanoSource
- hashCode() - Method in class com.pervasivecode.utils.time.testing.FakePeriodicRunner
- hashCode() - Method in class com.pervasivecode.utils.time.testing.FakeTimeSource
I
- incrementTimeNanos(long) - Method in class com.pervasivecode.utils.time.testing.FakeNanoSource
-
Increment the internal counter by this many fake nanoseconds.
L
- largestUnit() - Method in class com.pervasivecode.utils.time.DurationFormat
-
The largest allowable unit of time to use when formatting the
Duration
value.
N
- now() - Method in class com.pervasivecode.utils.time.testing.FakeTimeSource
-
Return the fake value representing the "current" time.
- now() - Method in interface com.pervasivecode.utils.time.TimeSource
-
Get the current wall-clock time.
- numberFormat() - Method in class com.pervasivecode.utils.time.DurationFormat
-
The NumberFormat which the DurationFormatter will use when formatting individual parts of Duration values.
- numFractionalDigits() - Method in class com.pervasivecode.utils.time.DurationFormat
-
Set the maximum number of digits to use to represent a fractional amount of the smallest allowed unit.
P
- partDelimiter() - Method in class com.pervasivecode.utils.time.DurationFormat
-
The delimiter to use to separate each part of the formatted value.
- PeriodicRunner - Interface in com.pervasivecode.utils.time
-
An object that can run a single Runnable task repeatedly at a steady rate.
R
- remainderHandling() - Method in class com.pervasivecode.utils.time.DurationFormat
-
Specify how values that are smaller than the smallest allowed unit with its fractional digits are handled.
- ROUND_HALF_EVEN - com.pervasivecode.utils.time.DurationRemainderHandling
-
Round the remainder value to the nearest whole number using the rules described for
RoundingMode.HALF_EVEN
. - runOnce() - Method in class com.pervasivecode.utils.time.testing.FakePeriodicRunner
-
Simulate the periodic timer firing and running the
Runnable
task.
S
- setLargestUnit(ChronoUnit) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setNumberFormat(NumberFormat) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setNumFractionalDigits(Integer) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setPartDelimiter(String) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setPeriodicTask(Runnable) - Method in interface com.pervasivecode.utils.time.PeriodicRunner
-
Specify the task that this PeriodicRunner should run periodically.
- setPeriodicTask(Runnable) - Method in class com.pervasivecode.utils.time.SimplePeriodicRunner
- setPeriodicTask(Runnable) - Method in class com.pervasivecode.utils.time.testing.FakePeriodicRunner
- setRemainderHandling(DurationRemainderHandling) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setSmallestUnit(ChronoUnit) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setSuppressedUnits(Set<ChronoUnit>) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setUnitForZeroDuration(ChronoUnit) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- setUnitSuffixProvider(UnitSuffixProvider) - Method in class com.pervasivecode.utils.time.DurationFormat.Builder
- shutdownGracefully(long, TimeUnit) - Method in class com.pervasivecode.utils.time.SimplePeriodicRunnerFactory
-
Wait up to a specified amount of time for a currently-running
Runnable
task to finish, if any, and then shut down. - shutdownNow() - Method in class com.pervasivecode.utils.time.SimplePeriodicRunnerFactory
-
Interrupt a running task (if any) and do not run any scheduled tasks from now on.
- SimplePeriodicRunner - Class in com.pervasivecode.utils.time
-
A simple implementation of a
PeriodicRunner
using aScheduledExecutorService
. - SimplePeriodicRunnerFactory - Class in com.pervasivecode.utils.time
-
Instances of this class will run a single
Runnable
task repeatedly at a rate specified in terms of an interval. - SimplePeriodicRunnerFactory() - Constructor for class com.pervasivecode.utils.time.SimplePeriodicRunnerFactory
-
Create an instance that will produce
SimplePeriodicRunner
instances that all share the same scheduling thread. - singularAndPlural(Map<ChronoUnit, String>, Map<ChronoUnit, String>) - Static method in class com.pervasivecode.utils.time.UnitSuffixProviders
-
Get a UnitSuffixProvider that provides unit suffixes that are either singluar or plural.
- singularAndPlural(Map<ChronoUnit, String>, Map<ChronoUnit, String>, boolean) - Static method in class com.pervasivecode.utils.time.UnitSuffixProviders
-
Get a UnitSuffixProvider that provides unit suffixes that are either singluar or plural, with a configurable definition of whether negative one is considered to be singular.
- smallestUnit() - Method in class com.pervasivecode.utils.time.DurationFormat
-
The smallest allowable unit of time to use when formatting the
Duration
value. - start() - Method in interface com.pervasivecode.utils.time.PeriodicRunner
-
Start calling the specified Runnable task periodically.
- start() - Method in class com.pervasivecode.utils.time.SimplePeriodicRunner
- start() - Method in class com.pervasivecode.utils.time.testing.FakePeriodicRunner
-
Set an internal flag saying that this runner is in the started state.
- started - Variable in class com.pervasivecode.utils.time.testing.FakePeriodicRunner
- stop() - Method in interface com.pervasivecode.utils.time.PeriodicRunner
-
Stop calling the specified Runnable task periodically.
- stop() - Method in class com.pervasivecode.utils.time.SimplePeriodicRunner
-
Stop the Runnable task from executing in the future.
- stop() - Method in class com.pervasivecode.utils.time.testing.FakePeriodicRunner
-
Set an internal flag saying that this runner is not in the started state.
- suffixFor(ChronoUnit, int) - Method in interface com.pervasivecode.utils.time.UnitSuffixProvider
-
Get the appropriate suffix to use for the specified unit and magnitude.
- suffixFor(ChronoUnit, BigDecimal) - Method in interface com.pervasivecode.utils.time.UnitSuffixProvider
-
Get the appropriate suffix to use for the specified unit and magnitude.
- suppressedUnits() - Method in class com.pervasivecode.utils.time.DurationFormat
-
Get the set of units that should not be included in the list of allowed units, even if they fall within the range described by the smallestUnit and largestUnit properties.
T
- TimeSource - Interface in com.pervasivecode.utils.time
-
An object that supplies values meant to represent the current wall-clock time.
- TRUNCATE - com.pervasivecode.utils.time.DurationRemainderHandling
-
Drop the remainder value.
U
- unitForZeroDuration() - Method in class com.pervasivecode.utils.time.DurationFormat
-
The unit of time to use when formatting a
Duration
value of zero. - units() - Method in class com.pervasivecode.utils.time.DurationFormat
-
Get a list of units which are greater than or equal to smallestUnit and less than or equal to largestUnit, without the units specified by
DurationFormat.suppressedUnits()
. - unitSuffixProvider() - Method in class com.pervasivecode.utils.time.DurationFormat
-
The provider of unit suffixes that the
DurationFormatter
will use when formatting each part of theDuration
. - UnitSuffixProvider - Interface in com.pervasivecode.utils.time
-
A provider of unit suffixes for formatting
Duration
values of varying units. - UnitSuffixProviders - Class in com.pervasivecode.utils.time
-
Factory methods for UnitSuffixProvider instances that behave in ways that are appropriate for most locales.
- usShortSuffixProvider() - Static method in class com.pervasivecode.utils.time.DurationFormats
-
Get a UnitSuffixProvider that provides abbreviated US suffixes such as "µs" for microseconds and "m" for minutes.
V
- valueOf(String) - Static method in enum com.pervasivecode.utils.time.DurationRemainderHandling
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.pervasivecode.utils.time.DurationRemainderHandling
-
Returns an array containing the constants of this enum type, in the order they are declared.
All Classes All Packages