本文整理了Java中java.util.Calendar.getGreatestMinimum()
方法的一些代码示例,展示了Calendar.getGreatestMinimum()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Calendar.getGreatestMinimum()
方法的具体详情如下:
包路径:java.util.Calendar
类名称:Calendar
方法名:getGreatestMinimum
[英]Returns the greatest minimum value of the given field. This is the biggest value that getActualMinimum can return for any possible time.
[中]返回给定字段的最大最小值。这是getActualMinimum在任何可能的时间都可以返回的最大值。
代码示例来源:origin: robovm/robovm
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: com.liferay.portal/com.liferay.portal.kernel
/**
* Method reduce_constant_length_field
*/
protected static void reduce_constant_length_field(
int field, Calendar start, Calendar candidate) {
if ((start.getMaximum(field) != start.getLeastMaximum(field)) ||
(start.getMinimum(field) != start.getGreatestMinimum(field))) {
throw new IllegalArgumentException("Not a constant length field");
}
int delta = start.get(field) - candidate.get(field);
if (delta > 0) {
int fieldLength =
start.getMaximum(field) - start.getMinimum(field) + 1;
delta -= fieldLength;
}
candidate.add(field, delta);
}
代码示例来源:origin: com.aoindustries/ao-lang
@Override
public int getGreatestMinimum(int field) {
return wrapped.getGreatestMinimum(field);
}
代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base
/**
* Returns the highest minimum value for the given field if varies.
* Otherwise same as getMinimum(). For Gregorian, no difference.
* @param field the given time field.
* @return the highest minimum value for the given time field.
* @stable ICU 2.0
*/
public final int getGreatestMinimum(int field) {
return calendar.getGreatestMinimum(getJDKField(field));
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base
/**
* Returns the highest minimum value for the given field if varies.
* Otherwise same as getMinimum(). For Gregorian, no difference.
* @param field the given time field.
* @return the highest minimum value for the given time field.
* @stable ICU 2.0
*/
public final int getGreatestMinimum(int field) {
return calendar.getGreatestMinimum(getJDKField(field));
}
代码示例来源:origin: EvoSuite/evosuite
@Override
public int getGreatestMinimum(int field) {
Capturer.capture(Instrumenter.CAPTURE_ID_JAVA_UTIL_CALENDAR, this, "getGreatestMinimum", "(I)V", new Object[] {field});
int ret = wrappedCalendar.getGreatestMinimum(field);
Capturer.enable(Instrumenter.CAPTURE_ID_JAVA_UTIL_CALENDAR, this, ret);
return ret;
}
代码示例来源:origin: jtulach/bck2brwsr
int fieldValue = getGreatestMinimum(field);
int endValue = getMinimum(field);
代码示例来源:origin: org.apidesign.bck2brwsr/emul
int fieldValue = getGreatestMinimum(field);
int endValue = getMinimum(field);
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: ibinti/bugvm
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: MobiVM/robovm
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Returns the minimum value of the given field for the current date.
*/
public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
代码示例来源:origin: com.liferay.portal/portal-kernel
/**
* Method reduce_constant_length_field
*
*
* @param field
* @param start
* @param candidate
*
*/
protected static void reduce_constant_length_field(int field,
Calendar start,
Calendar candidate) {
if ((start.getMaximum(field) != start.getLeastMaximum(field))
|| (start.getMinimum(field) != start.getGreatestMinimum(field))) {
throw new IllegalArgumentException("Not a constant length field");
}
int fieldLength = (start.getMaximum(field) - start.getMinimum(field)
+ 1);
int delta = start.get(field) - candidate.get(field);
if (delta > 0) {
delta -= fieldLength;
}
candidate.add(field, delta);
}
代码示例来源:origin: com.liferay.portal/portal-kernel
/**
* Method reduce_constant_length_field
*
*
* @param field
* @param start
* @param candidate
*
*/
protected static void reduce_constant_length_field(int field,
Calendar start,
Calendar candidate) {
if ((start.getMaximum(field) != start.getLeastMaximum(field))
|| (start.getMinimum(field) != start.getGreatestMinimum(field))) {
throw new IllegalArgumentException("Not a constant length field");
}
int fieldLength = (start.getMaximum(field) - start.getMinimum(field)
+ 1);
int delta = start.get(field) - candidate.get(field);
if (delta > 0) {
delta -= fieldLength;
}
candidate.add(field, delta);
}
代码示例来源:origin: ThreeTen/threetenbp
return ValueRange.of(jcal.getMinimum(Calendar.MONTH) + 1, jcal.getGreatestMinimum(Calendar.MONTH) + 1,
jcal.getLeastMaximum(Calendar.MONTH) + 1, jcal.getMaximum(Calendar.MONTH) + 1);
case DAY_OF_YEAR: {
代码示例来源:origin: org.threeten/threetenbp
return ValueRange.of(jcal.getMinimum(Calendar.MONTH) + 1, jcal.getGreatestMinimum(Calendar.MONTH) + 1,
jcal.getLeastMaximum(Calendar.MONTH) + 1, jcal.getMaximum(Calendar.MONTH) + 1);
case DAY_OF_YEAR: {
代码示例来源:origin: com.github.seratch/java-time-backport
return ValueRange.of(jcal.getMinimum(Calendar.MONTH) + 1, jcal.getGreatestMinimum(Calendar.MONTH) + 1,
jcal.getLeastMaximum(Calendar.MONTH) + 1, jcal.getMaximum(Calendar.MONTH) + 1);
case DAY_OF_YEAR: {
内容来源于网络,如有侵权,请联系作者删除!