- java.lang.Object
- 
- 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 ClassDateTimeSyntaxis 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'sDatevalue by callinggetValue(). A date-time attribute'sDatevalue is established when it is constructed (seeDateTimeSyntax(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.Calendarobject to construct ajava.util.Dateobject, then use thejava.util.Dateobject 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 ajava.util.Calendarobject and set it to thejava.util.Datefrom the date-time attribute. ClassDateTimeSyntaxstores its value in the form of ajava.util.Daterather than ajava.util.Calendarbecause it typically takes less memory to store and less time to compare ajava.util.Datethan ajava.util.Calendar.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedDateTimeSyntax(Date value)Construct a new date-time attribute with the givenjava.util.Datevalue.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Returns whether this date-time attribute is equivalent to the passed in object.DategetValue()Returns this date-time attribute'sjava.util.Datevalue.inthashCode()Returns a hash code value for this date-time attribute.StringtoString()Returns a string value corresponding to this date-time attribute.
 
- 
- 
- 
Constructor Detail- 
DateTimeSyntaxprotected DateTimeSyntax(Date value) Construct a new date-time attribute with the givenjava.util.Datevalue.- Parameters:
- value-- java.util.Datevalue
- Throws:
- NullPointerException- if- valueis- null
 
 
- 
 - 
Method Detail- 
getValuepublic Date getValue() Returns this date-time attribute'sjava.util.Datevalue.- Returns:
- the Date
 
 - 
equalspublic 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:- objectis not- null.
- objectis an instance of class- DateTimeSyntax.
- This date-time attribute's java.util.Datevalue andobject'sjava.util.Datevalue are equal.
 - Overrides:
- equalsin class- Object
- Parameters:
- object-- Objectto compare to
- Returns:
- trueif- objectis equivalent to this date-time attribute,- falseotherwise
- See Also:
- Object.hashCode(),- HashMap
 
 - 
hashCodepublic int hashCode() Returns a hash code value for this date-time attribute. The hashcode is that of this attribute'sjava.util.Datevalue.- Overrides:
- hashCodein class- Object
- Returns:
- a hash code value for this object.
- See Also:
- Object.equals(java.lang.Object),- System.identityHashCode(java.lang.Object)
 
 
- 
 
-