net.ponec.jworksheet.bo.item
Class YearMonthDay

Package class diagram package YearMonthDay
java.lang.Object
  extended by net.ponec.jworksheet.bo.item.YearMonthDay
All Implemented Interfaces:
java.lang.Comparable, UjoCloneable, ValueTextable

public class YearMonthDay
extends java.lang.Object
implements java.lang.Comparable, ValueTextable, UjoCloneable

Year, month and day


Field Summary
static java.text.SimpleDateFormat exportDateFormat
           
static int TYPE_DAY
           
static int TYPE_MONTH
           
static int TYPE_YEAR
           
 
Constructor Summary
  YearMonthDay()
          Creates a new TODAY instance of Time
  YearMonthDay(java.util.Date date)
          Creates a new instance of Time
protected YearMonthDay(int yearMonthDay)
          Creates a new instance of Time
  YearMonthDay(java.lang.String yearMonthDay)
          Creates a new instance of Time
 
Method Summary
 void addDay(int day)
           
 java.lang.Object clone(int depth, java.lang.Object context)
           
 YearMonthDay cloneDay()
           
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
          Equals to another YearMonthDay ?
 int get(int itemType)
          See constants TYPE* for more information.
 java.util.Calendar getCalendar()
           
 java.util.Date getTime()
          Get Time
 void setToday()
           
 void setYearMonthDay(java.util.Calendar calendar)
          Set value by Calendar
 void setYearMonthDay(java.util.Date date)
          Set value by Date
 java.lang.String toString()
          Sample: 2007-07 or 2006-12
 java.lang.String toString(ApplContext context)
          Get Localized String to GUI.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_DAY

public static final int TYPE_DAY
See Also:
Constant Field Values

TYPE_MONTH

public static final int TYPE_MONTH
See Also:
Constant Field Values

TYPE_YEAR

public static final int TYPE_YEAR
See Also:
Constant Field Values

exportDateFormat

public static final java.text.SimpleDateFormat exportDateFormat
Constructor Detail

YearMonthDay

protected YearMonthDay(int yearMonthDay)
Creates a new instance of Time

Parameters:
yearMonthDay - 2006-10-21

YearMonthDay

public YearMonthDay(java.lang.String yearMonthDay)
Creates a new instance of Time

Parameters:
yearMonthDay - 2006-10-21

YearMonthDay

public YearMonthDay(java.util.Date date)
Creates a new instance of Time


YearMonthDay

public YearMonthDay()
Creates a new TODAY instance of Time

Method Detail

setYearMonthDay

public void setYearMonthDay(java.util.Date date)
Set value by Date


setYearMonthDay

public void setYearMonthDay(java.util.Calendar calendar)
Set value by Calendar


get

public int get(int itemType)
See constants TYPE* for more information.


getCalendar

public java.util.Calendar getCalendar()

getTime

public java.util.Date getTime()
Get Time


addDay

public void addDay(int day)

setToday

public void setToday()

toString

public java.lang.String toString()
Sample: 2007-07 or 2006-12

Specified by:
toString in interface ValueTextable
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(ApplContext context)
Get Localized String to GUI.


equals

public boolean equals(java.lang.Object obj)
Equals to another YearMonthDay ?

Overrides:
equals in class java.lang.Object

cloneDay

public YearMonthDay cloneDay()

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

clone

public java.lang.Object clone(int depth,
                              java.lang.Object context)
Specified by:
clone in interface UjoCloneable


Copyright © 2007-2009 PPonec