aicas logo Jamaica 3.4 release 8

javax.xml.datatype
Class XMLGregorianCalendar

java.lang.Object
  extended by javax.xml.datatype.XMLGregorianCalendar
All Implemented Interfaces:
Cloneable

public abstract class XMLGregorianCalendar
extends Object
implements Cloneable

An XML Schema 1.0 date/time data type.

Since:
1.3

Constructor Summary
XMLGregorianCalendar()
           
 
Method Summary
abstract  void add(Duration duration)
          Adds the specified duration to this calendar.
abstract  void clear()
          Resets all fields to undefined.
abstract  Object clone()
          clone creates a shallow clone of this.
abstract  int compare(XMLGregorianCalendar xmlGregorianCalendar)
           
 boolean equals(Object obj)
          equals compares this object to another object.
abstract  int getDay()
           
abstract  BigInteger getEon()
           
abstract  BigInteger getEonAndYear()
           
abstract  BigDecimal getFractionalSecond()
           
abstract  int getHour()
           
 int getMillisecond()
           
abstract  int getMinute()
           
abstract  int getMonth()
           
abstract  int getSecond()
           
abstract  int getTimezone()
           
abstract  TimeZone getTimeZone(int defaultZoneoffset)
           
abstract  QName getXMLSchemaType()
           
abstract  int getYear()
           
 int hashCode()
          hashCode returns a hash code for this object.
abstract  boolean isValid()
          Determines the validity of this calendar by getXMLSchemaType constraints.
abstract  XMLGregorianCalendar normalize()
           
abstract  void reset()
          Resets all fields to their original values.
abstract  void setDay(int day)
           
abstract  void setFractionalSecond(BigDecimal fractional)
           
abstract  void setHour(int hour)
           
abstract  void setMillisecond(int millisecond)
           
abstract  void setMinute(int minute)
           
abstract  void setMonth(int month)
           
abstract  void setSecond(int second)
           
 void setTime(int hour, int minute, int second)
           
 void setTime(int hour, int minute, int second, BigDecimal fractional)
           
 void setTime(int hour, int minute, int second, int millisecond)
           
abstract  void setTimezone(int offset)
           
abstract  void setYear(BigInteger year)
           
abstract  void setYear(int year)
           
abstract  GregorianCalendar toGregorianCalendar()
           
abstract  GregorianCalendar toGregorianCalendar(TimeZone timezone, Locale locale, XMLGregorianCalendar defaults)
           
 String toString()
          toString creates a printable string that represents this object for debugging purposes.
abstract  String toXMLFormat()
          Returns the XML Schema lexical representation of this calendar.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLGregorianCalendar

public XMLGregorianCalendar()
Method Detail

clear

public abstract void clear()
Resets all fields to undefined.


reset

public abstract void reset()
Resets all fields to their original values.


setYear

public abstract void setYear(BigInteger year)

setYear

public abstract void setYear(int year)

setMonth

public abstract void setMonth(int month)

setDay

public abstract void setDay(int day)

setTimezone

public abstract void setTimezone(int offset)

setTime

public void setTime(int hour,
                    int minute,
                    int second)

setHour

public abstract void setHour(int hour)

setMinute

public abstract void setMinute(int minute)

setSecond

public abstract void setSecond(int second)

setMillisecond

public abstract void setMillisecond(int millisecond)

setFractionalSecond

public abstract void setFractionalSecond(BigDecimal fractional)

setTime

public void setTime(int hour,
                    int minute,
                    int second,
                    BigDecimal fractional)

setTime

public void setTime(int hour,
                    int minute,
                    int second,
                    int millisecond)

getEon

public abstract BigInteger getEon()

getYear

public abstract int getYear()

getEonAndYear

public abstract BigInteger getEonAndYear()

getMonth

public abstract int getMonth()

getDay

public abstract int getDay()

getTimezone

public abstract int getTimezone()

getHour

public abstract int getHour()

getMinute

public abstract int getMinute()

getSecond

public abstract int getSecond()

getMillisecond

public int getMillisecond()

getFractionalSecond

public abstract BigDecimal getFractionalSecond()

compare

public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar)

normalize

public abstract XMLGregorianCalendar normalize()

equals

public boolean equals(Object obj)
Description copied from class: Object
equals compares this object to another object.

Equals must be symmetric (a.equals(b) == b.equals(a)), reflexive (a.equals(a)==true) and transitive (a.equals(b) && b.equals(c) IMPLIES (a.equals(c))) and not change over time (a.equals(b) == a.equals(b)). a.equals(null) should always return false.

If a.equals(b) is true for two objects a and b, then a.hashCode()==b.hashCode() must hold.

The default implementation of equals returns this==other.

Overrides:
equals in class Object
Parameters:
obj - the other object.
Returns:
if this and other are considered equal.

hashCode

public int hashCode()
Description copied from class: Object
hashCode returns a hash code for this object. The hash code must be equal for two objects a and b if a.equals(b) is true.

The default implementation returns System.identityHashCode(this).

Overrides:
hashCode in class Object
Returns:
a hash code value.

toXMLFormat

public abstract String toXMLFormat()
Returns the XML Schema lexical representation of this calendar.


getXMLSchemaType

public abstract QName getXMLSchemaType()

toString

public String toString()
Description copied from class: Object
toString creates a printable string that represents this object for debugging purposes.

The default implementation returns getClass().getName() + '@' + Integer.toHexString(hashCode()).

Overrides:
toString in class Object
Returns:
a string identifying this object.

isValid

public abstract boolean isValid()
Determines the validity of this calendar by getXMLSchemaType constraints.


add

public abstract void add(Duration duration)
Adds the specified duration to this calendar.


toGregorianCalendar

public abstract GregorianCalendar toGregorianCalendar()

toGregorianCalendar

public abstract GregorianCalendar toGregorianCalendar(TimeZone timezone,
                                                      Locale locale,
                                                      XMLGregorianCalendar defaults)

getTimeZone

public abstract TimeZone getTimeZone(int defaultZoneoffset)

clone

public abstract Object clone()
Description copied from class: Object
clone creates a shallow clone of this.

Overrides:
clone in class Object
Returns:
a clone of this object.

aicas logo Jamaica 3.4 release 8

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2009 aicas GmbH. All Rights Reserved.