Package de.xima.fc.common.bean_models
Enum ETimeUnit
- All Implemented Interfaces:
INamedUiElement
,Serializable
,Comparable<ETimeUnit>
Enumeration for the unit of the read and connect timeout of the HTTP request action.
- Since:
- 8.1.0
- Author:
- XIMA MEDIA GmbH
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription86400 seconds.3600 seconds.1/1000000th of a second.1/1000th of a second.60 seconds.1/1000000000th of a second.One second.604800 seconds. -
Field Summary
Fields inherited from interface de.xima.fc.interfaces.INamedUiElement
ATTR_DISPLAY_NAME
-
Method Summary
Modifier and TypeMethodDescriptionconvertToBigDecimal
(long duration, ETimeUnit targetUnit, MathContext mathContext) Converts the given duration to the given unit.convertToBigInt
(long duration, ETimeUnit targetUnit) Converts the given duration to the given unit.double
convertToDouble
(long duration, ETimeUnit targetUnit) Converts the given duration to the given unit.long
convertToLong
(long duration, ETimeUnit targetUnit) Converts the given duration to the given unit.getDisplayName
(Locale locale) org.apache.commons.math3.fraction.Fraction
Gets the scale factor of this unit, i.e. the number of seconds in this unit.static ETimeUnit
Returns the enum constant of this type with the specified name.static ETimeUnit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NANOSECONDS
1/1000000000th of a second. -
MICROSECONDS
1/1000000th of a second. -
MILLISECONDS
1/1000th of a second. -
SECONDS
One second. -
MINUTES
60 seconds. -
HOURS
3600 seconds. -
DAYS
86400 seconds. -
WEEKS
604800 seconds.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
convertToBigDecimal
Converts the given duration to the given unit.- Parameters:
duration
- The duration to convert.targetUnit
- The unit to convert to.mathContext
- The math context to use for the division.- Returns:
- The given duration expressed in the target unit.
-
convertToBigInt
Converts the given duration to the given unit.- Parameters:
duration
- The duration to convert.targetUnit
- The unit to convert to.- Returns:
- The given duration expressed in the target unit.
-
convertToDouble
Converts the given duration to the given unit.- Parameters:
duration
- The duration to convert.targetUnit
- The unit to convert to.- Returns:
- The given duration expressed in the target unit.
-
convertToLong
Converts the given duration to the given unit.- Parameters:
duration
- The duration to convert.targetUnit
- The unit to convert to.- Returns:
- The given duration expressed in the target unit.
-
getDisplayName
- Specified by:
getDisplayName
in interfaceINamedUiElement
- Returns:
- Wert, der das entsprechende Objekt an Oberfläche repräsentiert (wird i.A. zur Laufzeit ermittelt).
-
scaleFactor
public org.apache.commons.math3.fraction.Fraction scaleFactor()Gets the scale factor of this unit, i.e. the number of seconds in this unit.- Returns:
- The scale factor of this unit.
-