- 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
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. A date-time attribute's Date value is established when it is constructed (seegetValue()). Once constructed, a date-time attribute's value is immutable.DateTimeSyntax(Date)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. Class DateTimeSyntax stores 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 Summary
Constructors Modifier Constructor and Description protectedDateTimeSyntax(Date value)Construct a new date-time attribute with the givenjava.util.Datevalue.
-
Method Summary
Methods Modifier and Type Method and 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
-
DateTimeSyntax
protected DateTimeSyntax(Date value)
Construct a new date-time attribute with the givenjava.util.Datevalue.- Parameters:
value-java.util.Datevalue.- Throws:
NullPointerException- (unchecked exception) Thrown iftheValueis null.
-
-
Method Detail
-
getValue
public Date getValue()
Returns this date-time attribute'sjava.util.Datevalue.- Returns:
- the Date.
-
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:-
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 classObject- Parameters:
object- Object to compare to.- Returns:
- True if
objectis equivalent to this date-time attribute, false otherwise. - See Also:
Object.hashCode(),HashMap
-
-
hashCode
public int hashCode()
Returns a hash code value for this date-time attribute. The hashcode is that of this attribute'sjava.util.Datevalue.- Overrides:
hashCodein classObject- Returns:
- a hash code value for this object.
- See Also:
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/print/attribute/datetimesyntax.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.