public class Configuration extends Object
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
ConversionMode |
getConversionMode()
Returns the conversion mode applied in supported operations if no specific mode is set.
|
PrintStyle |
getPrintStyleForDetails()
Returns the default
PrintStyle to be applied by the following operations:
Stopwatch.printDetails(java.io.PrintStream)
MonitoredOperation.printDetails(java.io.PrintStream)
|
PrintStyle |
getPrintStyleForSummary()
Returns the default
PrintStyle to be applied by the following operations:
Stopwatch.printSummary(java.io.PrintStream)
MonitoredOperation.printSummary(java.io.PrintStream)
|
int |
getScale()
Returns the maximum number of decimal places applied if double-precision conversion
mode is set.
|
TimeUnit |
getTimeUnit()
Returns the time unit maintained by default if no specific time unit is specified.
|
void |
setConversionMode(ConversionMode conversionMode)
Defines the default conversion mode to be applied in supported operations if no
specific mode is set.
|
void |
setPrintStyleForDetails(PrintStyle printStyle)
Defines the default
PrintStyle to be applied by the following operations:
Stopwatch.printDetails(java.io.PrintStream)
MonitoredOperation.printDetails(java.io.PrintStream)
|
void |
setPrintStyleForSummary(PrintStyle printStyle)
Defines the default
PrintStyle to be applied by the following operations:
Stopwatch.printSummary(java.io.PrintStream)
MonitoredOperation.printSummary(java.io.PrintStream)
|
void |
setScale(int scale)
Sets a maximum number of decimal places to be applied if double-precision conversion
mode is set.
|
void |
setTimeUnit(TimeUnit timeUnit)
Defines the time unit to be maintained by default if no specific time unit is
specified.
|
public TimeUnit getTimeUnit()
public void setTimeUnit(TimeUnit timeUnit)
timeUnit - the TimeUnit to setNullPointerException - if the specified time unit is nullpublic ConversionMode getConversionMode()
public void setConversionMode(ConversionMode conversionMode)
conversionMode - the ConversionMode to setNullPointerException - if the specified conversion mode is nullpublic int getScale()
public void setScale(int scale)
scale - a number between 0 and 16 to be setIllegalArgumentException - if the specified number is outside the allowed rangepublic PrintStyle getPrintStyleForSummary()
PrintStyle to be applied by the following operations:
PrintStylepublic void setPrintStyleForSummary(PrintStyle printStyle)
PrintStyle to be applied by the following operations:
printStyle - the PrintStyle to be set; must not be nullNullPointerException - if the specified PrintStyle is nullpublic PrintStyle getPrintStyleForDetails()
PrintStyle to be applied by the following operations:
PrintStylepublic void setPrintStyleForDetails(PrintStyle printStyle)
PrintStyle to be applied by the following operations:
printStyle - the PrintStyle to be set; must not be nullNullPointerException - if the specified PrintStyle is nullCopyright © 2021. All rights reserved.