ProgramixGenericLib v5.0.1

com.programix.time
Class DateTimeField

java.lang.Object
  extended by com.programix.time.DateTimeField
All Implemented Interfaces:
Serializable

public final class DateTimeField
extends Object
implements Serializable

Used to specify a field in a date/time for the Gregorian calendar. See each of the fields defined for specifics: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, and MILLISECOND.

Author:
Paul Hyde
See Also:
Serialized Form

Field Summary
static DateTimeField DAY
          The day [date] of the month.
static DateTimeField HOUR
          The hour of the day in 24-hour format.
static DateTimeField MILLISECOND
          The millisecond of the second.
static DateTimeField MINUTE
          The minute of the hour.
static DateTimeField MONTH
          The month of the year.
static DateTimeField SECOND
          The second of the minute.
static DateTimeField YEAR
          The 4-digit year.
 
Constructor Summary
DateTimeField(int code, String name)
           
 
Method Summary
 boolean equals(Object obj)
          Use this method instead of == to be sure that serialization or multiple class loaders have not resulted in multiple instances.
 String getName()
          Returns the name of this anchor.
static DateTimeField[] getValues()
          Returns an array of all the legal values.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

YEAR

public static final DateTimeField YEAR
The 4-digit year. The field holding 2004 in 2004-12-19 15:45:52.809.


MONTH

public static final DateTimeField MONTH
The month of the year. The field holding 12 in 2004-12-19 15:45:52.809.


DAY

public static final DateTimeField DAY
The day [date] of the month. The field holding 19 in 2004-12-19 15:45:52.809.


HOUR

public static final DateTimeField HOUR
The hour of the day in 24-hour format. The field holding 15 in 2004-12-19 15:45:52.809.


MINUTE

public static final DateTimeField MINUTE
The minute of the hour. The field holding 45 in 2004-12-19 15:45:52.809.


SECOND

public static final DateTimeField SECOND
The second of the minute. The field holding 52 in 2004-12-19 15:45:52.809.


MILLISECOND

public static final DateTimeField MILLISECOND
The millisecond of the second. The field holding 809 in 2004-12-19 15:45:52.809.

Constructor Detail

DateTimeField

public DateTimeField(int code,
                     String name)
Method Detail

getName

public String getName()
Returns the name of this anchor. For example: "NORTH", "CENTER", etc.


equals

public boolean equals(Object obj)
Use this method instead of == to be sure that serialization or multiple class loaders have not resulted in multiple instances.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getValues

public static DateTimeField[] getValues()
Returns an array of all the legal values. A cloned copy is returned, so no caution in how the array is used by the caller is required.


ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.