This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.print.attribute
class DateTimeSyntax

java.lang.Object extended by javax.print.attribute.DateTimeSyntax
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
DateTimeAtCompleted, DateTimeAtCreation, DateTimeAtProcessing, JobHoldUntil

public abstract class DateTimeSyntax
extends Object
implements Serializable, Cloneable

Class DateTimeSyntax is an abstract base class providing the common implementation of all attributes whose value is a date and time.

Under the hood, a date-time attribute is stored as a value of class java.util.Date. You can get a date-time attribute's Date value by calling {@link #getValue() getValue()}. A date-time attribute's Date value is established when it is constructed (see {@link #DateTimeSyntax(Date) DateTimeSyntax(Date)}). Once constructed, a date-time attribute's value is immutable.

To construct a date-time attribute from separate values of the year, month, day, hour, minute, and so on, use a java.util.Calendar object to construct a java.util.Date object, then use the java.util.Date object to construct the date-time attribute. To convert a date-time attribute to separate values of the year, month, day, hour, minute, and so on, create a java.util.Calendar object and set it to the java.util.Date from the date-time attribute. Class DateTimeSyntax stores its value in the form of a java.util.Date rather than a java.util.Calendar because it typically takes less memory to store and less time to compare a java.util.Date than a java.util.Calendar.


Constructor Summary
protected

          Construct a new date-time attribute with the given java.util.Date value.
 
Method Summary
 boolean
equals(Object object)

          Returns whether this date-time attribute is equivalent to the passed in object.
 Date

          Returns this date-time attribute's java.util.Date value.
 int

          Returns a hash code value for this date-time attribute.
 String

          Returns a string value corresponding to this date-time attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeSyntax

protected DateTimeSyntax(Date value)
Construct a new date-time attribute with the given java.util.Date value.

Parameters:
value - java.util.Date value.
Method Detail

equals

public boolean equals(Object object)
Returns whether this date-time attribute is equivalent to the passed in object. To be equivalent, all of the following conditions must be true:
  1. object is not null.
  2. object is an instance of class DateTimeSyntax.
  3. This date-time attribute's java.util.Date value and object's java.util.Date value are equal.

Overrides:
equals in class Object
Parameters:
object - Object to compare to.
Returns:
True if object is equivalent to this date-time attribute, false otherwise.

getValue

public Date getValue()
Returns this date-time attribute's java.util.Date value.

Returns:
the Date.

hashCode

public int hashCode()
Returns a hash code value for this date-time attribute. The hashcode is that of this attribute's java.util.Date value.

Overrides:
hashCode in class Object

toString

public String toString()
Returns a string value corresponding to this date-time attribute. The string value is just this attribute's java.util.Date value converted to a string.

Overrides:
toString in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.