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

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

public final class LeapIndicatorType
extends java.lang.Object
implements java.lang.Comparable<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)

Version:
$Rev: 586763 $, $Date: 2007-10-20 19:26:29 +0200 (Sat, 20 Oct 2007) $
Author:
Apache Directory Project

Field Summary
static LeapIndicatorType ALARM_CONDITION
          Constant for the "Alarm condition (clock not synchronized)" leap indicator type.
static LeapIndicatorType NEGATIVE_LEAP_SECOND
          Constant for the "Last minute has 59 seconds" leap indicator type.
static LeapIndicatorType NO_WARNING
          Constant for the "No leap second warning" leap indicator type.
static LeapIndicatorType POSITIVE_LEAP_SECOND
          Constant for the "Last minute has 61 seconds" leap indicator type.
static java.util.List<LeapIndicatorType> VALUES
          A list of all the leap indicator type constants.
 
Method Summary
 int compareTo(LeapIndicatorType that)
           
 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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field 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.


VALUES

public static final java.util.List<LeapIndicatorType> VALUES
A list of all the leap indicator type constants.

Method Detail

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.

compareTo

public int compareTo(LeapIndicatorType that)
Specified by:
compareTo in interface java.lang.Comparable<LeapIndicatorType>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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