com.novell.admin.ns
Class DateValue

java.lang.Object
  extended bycom.novell.admin.ns.ValueComponent
      extended bycom.novell.admin.ns.Value
          extended bycom.novell.admin.ns.DateValue
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class DateValue
extends Value

Storage class for all syntaxes that use date and time.

This is an immutable class.

See Also:
BooleanValue, HexValue, StringValue, LongValue, StreamValue, Serialized Form

Constructor Summary
DateValue(Syntax syntax, java.util.Date date)
          Constructor that uses a Date object.
DateValue(Syntax syntax, long millis)
          Constructs a DateValue object using an integer.
 
Method Summary
 java.lang.String getGeneralizedTime()
          Returns the value as a String in Generalized Time format.
 long getMillis()
          Returns the value as an integer.
 java.util.Date getValue()
          Returns the value as a Date.
 
Methods inherited from class com.novell.admin.ns.Value
clone
 
Methods inherited from class com.novell.admin.ns.ValueComponent
compareTo, equals, getSyntax, isWithinBounds, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateValue

public DateValue(Syntax syntax,
                 java.util.Date date)
Constructor that uses a Date object.

This constructor should only be called from date/time strategy classes and not directly in an application.

Parameters:
syntax - Associated syntax for this date value.
date - The Date object.

DateValue

public DateValue(Syntax syntax,
                 long millis)
Constructs a DateValue object using an integer.

This constructor should only be called from date/time strategy classes and not directly in an application.

Parameters:
syntax - Associated syntax for this date value.
millis - The milliseconds since Jan 1, 1970.
Method Detail

getGeneralizedTime

public java.lang.String getGeneralizedTime()
Returns the value as a String in Generalized Time format. YYYYMMDDhhmmssZ

Returns:
The value as integer type.

getMillis

public long getMillis()
Returns the value as an integer.

Returns:
The value as integer type.

getValue

public java.util.Date getValue()
Returns the value as a Date.

Returns:
The value as Date type.


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.