org.springframework.roo.classpath.operations
Class DateTime
java.lang.Object
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
SHORT
public static final DateTime SHORT
MEDIUM
public static final DateTime MEDIUM
NONE
public static final DateTime NONE
DateTime
public DateTime(String key,
char shortKey)
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.