Package org.ldaptive.transcode
Enum GeneralizedTimeValueTranscoder.FractionalPart
- java.lang.Object
-
- java.lang.Enum<GeneralizedTimeValueTranscoder.FractionalPart>
-
- org.ldaptive.transcode.GeneralizedTimeValueTranscoder.FractionalPart
-
- All Implemented Interfaces:
Serializable
,Comparable<GeneralizedTimeValueTranscoder.FractionalPart>
- Enclosing class:
- GeneralizedTimeValueTranscoder
private static enum GeneralizedTimeValueTranscoder.FractionalPart extends Enum<GeneralizedTimeValueTranscoder.FractionalPart>
Describes the fractional part of a generalized time string.
-
-
Field Summary
Fields Modifier and Type Field Description private int
scaleFactor
Scale factor to convert units to millis.
-
Constructor Summary
Constructors Modifier Constructor Description private
FractionalPart(int scale)
Creates a new fractional part.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
toMillis(String fraction)
Converts the given fractional date part to milliseconds.static GeneralizedTimeValueTranscoder.FractionalPart
valueOf(String name)
Returns the enum constant of this type with the specified name.static GeneralizedTimeValueTranscoder.FractionalPart[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Hours
public static final GeneralizedTimeValueTranscoder.FractionalPart Hours
Fractional hours.
-
Minutes
public static final GeneralizedTimeValueTranscoder.FractionalPart Minutes
Fractional minutes.
-
Seconds
public static final GeneralizedTimeValueTranscoder.FractionalPart Seconds
Fractional seconds.
-
-
Method Detail
-
values
public static GeneralizedTimeValueTranscoder.FractionalPart[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GeneralizedTimeValueTranscoder.FractionalPart c : GeneralizedTimeValueTranscoder.FractionalPart.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GeneralizedTimeValueTranscoder.FractionalPart valueOf(String name)
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
-
toMillis
int toMillis(String fraction)
Converts the given fractional date part to milliseconds.- Parameters:
fraction
- digits of fractional date part- Returns:
- fraction converted to milliseconds.
-
-