|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.datatypes.DateTimePattern.Element
public static class DateTimePattern.Element
A wrapper arround a field in a Calendar object. It provides a
minimal and maximal value for the integer value, which can be requested by code which is
producing a user interface to enter dates.
| Field Summary | |
|---|---|
(package private) int |
field
|
| Constructor Summary | |
|---|---|
DateTimePattern.Element(String n,
int field,
int min,
int max)
|
|
DateTimePattern.Element(String n,
int field,
int min,
int max,
int offset)
|
|
| Method Summary | |
|---|---|
int |
getField()
The associated constant in Calendar, e.g. |
int |
getMax()
The maximal value this field of the Calendar object can take. |
int |
getMin()
The minimal value this field of the Calendar object can take. |
String |
getName()
The name of the field in a Calendar object. |
int |
getNullValue()
The int-value representing null. |
int |
getOffset()
An offset to be used for presentation. |
int |
getValue(Calendar cal)
Normally equivalent with cal.getValue(getField()) |
String |
toString()
|
String |
toString(int value,
Locale locale,
int length)
Converts a value for the Calendar field associated with this Element to a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
final int field
| Constructor Detail |
|---|
DateTimePattern.Element(String n,
int field,
int min,
int max)
DateTimePattern.Element(String n,
int field,
int min,
int max,
int offset)
| Method Detail |
|---|
public final String getName()
public final int getField()
Calendar, e.g. Calendar.DAY_OF_MONTH or Calendar.SECOND
public final int getMin()
public final int getMax()
public final int getOffset()
public int getValue(Calendar cal)
cal.getValue(getField())
public String toString(int value,
Locale locale,
int length)
value - the value to convertlocale - A locale can be used in some instances. E.g. to generate month names.length - An indication of verboseness. Typically numeric results if a small number
(perhaps filled to this length) or words if a big number (and it makes sense, e.g. for
months, and weekdays).public String toString()
toString in class Objectpublic int getNullValue()
null. Some otherwise impossible value for the
field. This can be use as a marker value in the option-list to set the calendar value to null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||