org.springframework.roo.classpath.operations
Class DateTime

java.lang.Object
  extended by org.springframework.roo.classpath.operations.DateTime
All Implemented Interfaces:
Comparable<DateTime>

public class DateTime
extends Object
implements Comparable<DateTime>

Provides date format options for Date and Calendar types.

Since:
1.0
Author:
Stefan Schmidt

Field Summary
static DateTime MEDIUM
           
static DateTime NONE
           
static DateTime SHORT
           
 
Constructor Summary
DateTime(String key, char shortKey)
           
 
Method Summary
 int compareTo(DateTime o)
           
 boolean equals(Object obj)
           
 String getKey()
           
 char getShortKey()
           
 int hashCode()
           
static int parseDateFormat(char style)
          This method will return the DateTime style for the character of the style argument.
static DateTime parseDateTimeFormat(char style)
          This method will return the DateTime style for the character of the style argument.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SHORT

public static final DateTime SHORT

MEDIUM

public static final DateTime MEDIUM

NONE

public static final DateTime NONE
Constructor Detail

DateTime

public DateTime(String key,
                char shortKey)
Method Detail

getKey

public String getKey()

getShortKey

public char getShortKey()

parseDateFormat

public static int parseDateFormat(char style)
This method will return the DateTime style for the character of the style argument. If no style is recognized it will return DateFormat.SHORT

Parameters:
style - the date or time style, ie 'S'
Returns:

parseDateTimeFormat

public static DateTime parseDateTimeFormat(char style)
This method will return the DateTime style for the character of the style argument. For example style of '-' will return DateTime.NULL.

Parameters:
style - the date or time style, ie 'S'
Returns:
the DateTime style for the provided style argument

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public final int compareTo(DateTime o)
Specified by:
compareTo in interface Comparable<DateTime>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.