org.apache.directory.server.ntp.messages
Enum LeapIndicatorType

java.lang.Object
  extended by java.lang.Enum<LeapIndicatorType>
      extended by org.apache.directory.server.ntp.messages.LeapIndicatorType
All Implemented Interfaces:
Serializable, Comparable<LeapIndicatorType>

public enum LeapIndicatorType
extends Enum<LeapIndicatorType>

Leap Indicator (LI): This is a two-bit code warning of an impending leap second to be inserted/deleted in the last minute of the current day, with bit 0 and bit 1, respectively, coded as follows: LI Value Meaning ------------------------------------------------------- 00 0 no warning 01 1 last minute has 61 seconds 10 2 last minute has 59 seconds) 11 3 alarm condition (clock not synchronized)

Author:
Apache Directory Project

Enum Constant Summary
ALARM_CONDITION
          Constant for the "Alarm condition (clock not synchronized)" leap indicator type.
NEGATIVE_LEAP_SECOND
          Constant for the "Last minute has 59 seconds" leap indicator type.
NO_WARNING
          Constant for the "No leap second warning" leap indicator type.
POSITIVE_LEAP_SECOND
          Constant for the "Last minute has 61 seconds" leap indicator type.
 
Method Summary
 int getOrdinal()
          Returns the number associated with this leap indicator type.
static LeapIndicatorType getTypeByOrdinal(int type)
          Returns the leap indicator type when specified by its ordinal.
 String toString()
           
static LeapIndicatorType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LeapIndicatorType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO_WARNING

public static final LeapIndicatorType NO_WARNING
Constant for the "No leap second warning" leap indicator type.


POSITIVE_LEAP_SECOND

public static final LeapIndicatorType POSITIVE_LEAP_SECOND
Constant for the "Last minute has 61 seconds" leap indicator type.


NEGATIVE_LEAP_SECOND

public static final LeapIndicatorType NEGATIVE_LEAP_SECOND
Constant for the "Last minute has 59 seconds" leap indicator type.


ALARM_CONDITION

public static final LeapIndicatorType ALARM_CONDITION
Constant for the "Alarm condition (clock not synchronized)" leap indicator type.

Method Detail

values

public static LeapIndicatorType[] 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 (LeapIndicatorType c : LeapIndicatorType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LeapIndicatorType 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 name
NullPointerException - if the argument is null

getTypeByOrdinal

public static LeapIndicatorType getTypeByOrdinal(int type)
Returns the leap indicator type when specified by its ordinal.

Parameters:
type -
Returns:
The leap indicator type.

getOrdinal

public int getOrdinal()
Returns the number associated with this leap indicator type.

Returns:
The leap indicator type ordinal.

toString

public String toString()
Overrides:
toString in class Enum<LeapIndicatorType>


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.